Visual C++: Using 'engine' project as dependency for tools

Started by
0 comments, last by ApochPiQ 12 years, 8 months ago
Hi all,

I have a Visual C++ 2010 solution set up with an 'Engine' project, which depends on Ogre3D. I'm using this Engine project as a dependency for a 3d Studio Max exporter plugin project, which makes use of the 3D mesh file format reader/writer (one .h and one .cpp file) contained within the Engine project.

The problem I'm having is that when I build the Exporter project, it fails to resolve linker dependencies for bits of Ogre, even though none of that stuff is used in the Exporter project (I literally only make use of a 'Mesh' class and its Mesh::Write() function, which just opens a file and dumps data).

How can I set up my solution so that only the required dependencies from the Engine project are linked with the Exporter project? I've tried #ifndef'ing away anything that depends on Ogre with a '3DS_PLUGIN' preprocessor definition, which I've added to the project's settings, but it seems to be ignored when the Exporter project auto-builds Engine as a dependency (I've tested this by added '#error' inside the #ifndef).

Does anyone have ideas how I can achieve this?

"The right, man, in the wrong, place, can make all the dif-fer-rence in the world..." - GMan, Half-Life 2

A blog of my SEGA Megadrive development adventures: http://www.bigevilcorporation.co.uk

Advertisement
Try factoring out the common logic into a .lib project which is linked into both your engine and your plugin.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

This topic is closed to new replies.

Advertisement