-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile Error - Subdirectories not handled #4
Comments
This is a bug in interrogate. I'll look into it, but in the meantime, you can edit the vec3.h file referenced in the error message and change "const static" to "static const" on line 31. You can also put #ifndef CPPPARSER around the includes to the CMS library, which might work as well. |
Thanks. That got me past the configure phase, but then I got a fatal error about a file missing. Apparently, the error was due to this library having the header files stored in a separate directory. So, I did a make clean (IE: deleted the build folder) and then moved the header files into the same directory as the source files. It got a tiny bit further, but now it is complaining about another file that doesn't exist, despite it existing:
|
I managed to get it to build. The source files were all in a subfolder, like so:
Moving the contents of the src directory two levels up to the source directory fixed the issue. And that probably exposes another issue in Interrogate: that it has trouble picking up on headers stored in subdirectories. |
Hmm, seems more like a missing argument to reference the directory on the interrogate command-line. To be honest I'm not really familiar with how the modulebuilder handles additional include directories. For what it's worth, I checked in a fix for the interrogate parser issue to panda3d/panda3d@db97747 . |
Okay, it compiled, but when I actually tried using it, I found that it did not include anything from the library's namespace, despite the correct files having shown up in the compile output. If I run dir(CMS), I just see the following:
Trying to run "from CMS import ..." on any of the known classes, such as cell, octree, or array3d just returns an ImportError. |
Right now the CMake script only adds the panda include directory to the include path, and the root directory of the source/ folder. One would have to modify The classes are not exposed because the |
If you want to expose the classes without modifying the headers, you can run interrogate in -promiscuous mode, or you can create a .N file containing instructions like "forcetype SomeClass". See the .N files in the Panda source code base for examples. |
I tried changing the public: keyword to published:, but it resulted in compile errors. I also tried tweaking the interrogate wrapper script to include the promiscuous flag. It compiled, but I get an import error now:
|
I attempted to use P3DModuleBuilder with a C++ library that implements the Cubical Marching Squares algorithm, and ran into a compiler error:
I'll note that the CMS library compiles normally on its own. Would it be possible to 'trick' P3DModuleBuilder by copying over the compiled libCMS.a file?
The library in question is at: https://bitbucket.org/GRassovsky/cubical-marching-squares
The text was updated successfully, but these errors were encountered: