Visual Studio Debugging Settings - Shoggoth         Setting up debugging in Visual Studio - working directory and command - so that you can run your exe from within the IDE
Print

Tip_icon.png This information is regarding previous versions of Ogre. (Before the switch to a CMake based build system)

Info See Building Ogre for current version.

Help! It doesn't work when I run my exe from Visual Studio!

Do not worry. All you have to do is adjust your project properties:
properties.jpg

Navigate to the debugging section and enter the following values in Command and Working Directory:
debugging.jpg

Now it should work!

Help! It still doesn't work!

So, where is your executable?

If it's being copied to another location, you can't use the $(OutDir) variable.

If you use the samples directory of the OgreSDK, you need to change the values in Command and Working Directory to the following:
Command : $(OGRE_HOME)\bin\$(ConfigurationName)\$(ProjectName).exe

Working Directory: $(OGRE_HOME)\bin\$(ConfigurationName)

You also need to setup your project to copy your executable to this location.
Open up Project - Properties - Build Events - Post Build Events:

Postbuildevent.jpg

The command line to enter is copy "$(OutDir)\$(TargetFileName)" "$(OGRE_HOME)\bin\$(ConfigurationName)".


Contributors to this page: jacmoe133512 points  and Jacmoe135008 points  .
Page last modified on Monday 04 of January, 2010 14:30:16 UTC by jacmoe133512 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.