Jump to content
  • Advertisement
Sign in to follow this  
deadstar

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

This topic is 2469 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
Try factoring out the common logic into a .lib project which is linked into both your engine and your plugin.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!