Debug DLLs of Plugins?

Problems building or running the engine, queries about how to use features etc.
Post Reply
Chris_with_a_Gun
Greenskin
Posts: 106
Joined: Wed Nov 24, 2004 5:58 pm

Debug DLLs of Plugins?

Post by Chris_with_a_Gun »

I'm looking for a way to either rename the Plugin in debug mode (for example "Plugin_CgProgramManager_d.dll") or to change the plugin-path in debug mode to another directory (for example './plugins/debug). Is there a way to achieve either one of these?

thanks alot
User avatar
_mental_
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 419
Joined: Mon Jan 27, 2003 11:51 pm
Location: The Woodlands, TX
Contact:

Post by _mental_ »

AFAIK OGRE isn't setup to do this, but it should be possible. At the moment you should be maintaining separate debug and release plugins.cfg file, you could specify the individual names in each. You'd also have to modify the build scripts slightly so that the debug versions have a _d.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Just supply a different name for the plugins file in debug mode. Root::intialise takes it as a parameter, a simple #if _DEBUG in your code will do it.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

I don't really see why you would want to use a different name in debug mode. I'd went with the "another directory" way in all my projects. You can do this in two ways:

- Two plugin.cfgs; one in your release bin directory, one in your debug bin directory. Make the executable load the .cfg from the path it is in. This has the advantage of being easy to do, but might not be the nicest solution.

- Don't use a .cfg at all but manually use the loadPlugin method on Root. You can than use a #ifdef NDEBUG to see where to load the plugins from.
Post Reply