How to Include a C++ #define in a module
BlitzMax Forums/BlitzMax Programming/How to Include a C++ #define in a module
| ||
For my assimp module, I'm now editing one of the assimp source files "code/AssimpPCH.h" to put #define ASSIMP_BUILD_BOOST_WORKAROUND in the top This gets rid of the huge boost dependency. It does however mean that I and any other user, has to manually edit that file each time it is updated from assimps own SVN repository. (I'm including it in my own SVN project as an external) Is there another way to add such a #define, maybe by putting something in http://code.google.com/p/blitzmax-assimp/source/browse/trunk/source.bmx Thanks for any help |
| ||
I'm now editing one of the assimp source files tsk tsk... I'd file that under "last resort" :-) In your main module file (the one with the line Module ... in it), add this line : ModuleInfo "CC_OPTS: -DASSIMP_BUILD_BOOST_WORKAROUND" I realise it's not exactly a documented feature of BMK, but it helps a lot when wrapping libraries. |
| ||
This gets rid of the huge boost dependency. Boost is a fantastically useful library. I have 3 modules using it already : BaH.DateTime, BaH.Interprocess, and BaH.MathToolkit. The nice thing about Boost is that it is a header-only implementation, which means that the only code compiled into your binary, is those bits that you used. |
| ||
tsk tsk... I'd file that under "last resort" :-) Actually first resort in my case, just to see if it worked :-) Both Mac and Windows versions compile and run with this. YEEAR. Thanks! About boost: It might make it back in, but for now it's seems the most convenient thing to keep it out. |