Fri, 08/13/2021 - 18:18
Dear all,
I'm updating a Managed C++ library from OCCT 7.4.0 to to 7.5.2. The guy that did the 7.4.0 work for us as left in the meantime and I'm a bit rusty in the C/C++ field. But I managed to compile OCCT 7.5.2 successfully. When recompiling our own library though using OCCT 7.5.2, I'm stuck as the precompiler refuses to find (at least some) *.lxx files, for instance TCollection_AsciiString.lxx. Why aren't the lxx's file found while the hxx files are?
In order to get as far as I did I had to add "." as a search folder for the precompiler. This was my solution for the fact that in 7.5 files like TCollection_. have moved to src/TCollection/ where in 7.4.0 they were found directly in the inc/ folder. And files in a subdirectory of src do not specify their own path when including a file that is in the same directory. TCollection_AsciiString.hxx for example does this:
#include <TCollection_AsciiString.lxx>
The hxx and lxx file are in the same directory. I've added "." as a search folder. Why isn't the lxx file found even though the hxx file was? What should I do to fix this? I do not want to change the OCCT code.
I'm using Visual Studio 2019 to build all this for x64, both OCCT and our own library.
The mentioned files are really where I said they are. Executing dir OpenCASCADE-7.5.2-vc14-64\opencascade-7.5.2\src\TCollection\TCollection_AsciiString.*
gives:
Volume in drive C is Windows
Volume Serial Number is 740E-0943
Directory of [snip]\OpenCASCADE-7.5.2-vc14-64\opencascade-7.5.2\src\TCollection
13-08-2021 14:02 46,834 TCollection_AsciiString.cxx
13-08-2021 14:02 29,649 TCollection_AsciiString.hxx
13-08-2021 14:02 4,948 TCollection_AsciiString.lxx
Your help is much appreciated!
Sat, 08/14/2021 - 00:14
There was no such change in OCCT - all public API header files still packaged in "inc" folder. They are indeed located in "/src/PackageName/" folders, but building tools (CMake or genproj.tcl) either copy them into "inc" folder or generate links to "src".
Make sure your OCCT installation is properly configured and build is done.
Mon, 08/16/2021 - 10:25
Thanks. And of course you were right. I didn't expect the inc folder to be generated so I didn't look in build output. Thanks for the tip.