[Solved] Can't run my program through Visual Studios

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Dragfang
Posts: 21
Joined: Tue Mar 02, 2010 4:08 pm

[Solved] Can't run my program through Visual Studios

Post by Dragfang »

I guess this question is more about Visual Studios than Irrlicht, but you guys allways seem helpful :)
I can't compile and run my program through Visual Studios, since my game then can't find the media folder where all my 3d-models etc. are located.
I've set my VS to compile into a folder called the same as my project. And if I go into that folder after compilation and run the .exe file that VS just created it works fine and and all media files can be found. But Compile And Run crashes.
I guess this isn't a biggie, but I would like to use VS's debug to find memory leaks.

Example:

Code: Select all

env->getSkin()->setFont(env->getFont("media/fonts/GillSans12.png"));
terrainNode = smgr->addTerrainSceneNode("media/terrain-heightmap.bmp");
Project located at F:\Projects\ProjectName\
Executeable compiled to F:\Projects\ProjectName\ProjectName\
Media files in F:\Projects\ProjectName\ProjectName\Media\

Thx in advance.
Last edited by Dragfang on Sat Jan 15, 2011 7:49 pm, edited 1 time in total.
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

You need to set a correct working directory in your project configuration in visual studio, since it will use the project directory as the active working directory by default I believe
Dragfang
Posts: 21
Joined: Tue Mar 02, 2010 4:08 pm

Post by Dragfang »

Radikalizm wrote:You need to set a correct working directory in your project configuration in visual studio, since it will use the project directory as the active working directory by default I believe
Ah that was really easy :P Thx it works perfect now!
Post Reply