Archived

This topic is now archived and is closed to further replies.

Moagly

Runs in C++ but not with exe

Recommended Posts

Hey, i have created a demo, it compiles and runs fine in c++ but when i try to run the .exe, all i get is a blank white screen. The demo is using glut. Does ne1 have any idea what could be causing this or if there is anyway that i can fix it? Thanx Moagstar.

Share this post


Link to post
Share on other sites
hey !

i lack some info !
are u using VC++ ?
in that case, maybe your programm is seeking some info in other directories, and as your exe is in the debug dir it couldn''t file what you need.

that''s all i see now.

later

Fratt

Share this post


Link to post
Share on other sites
Yeah using c++, thanx u just solved it for me! i never even thought of putting the exe in the same directory as my textures!!!

God i feel like such an idiot.

Thanx
Moagstar

Share this post


Link to post
Share on other sites
Here''s how I do it and this might help you in the future.

Your exe goes either to release or debug by default.
I don''t like this.
What I do is change it to go to a ''bin'' directory and I also store my other data there. I usually have a structure like so:

project
project\bin
project\bin\images
...
and so on.

in visual c++, go to project->settings
click the "debug" tab and change "Executable for debug session..." to "./bin/mygame.exe" replacing mygame with whatever you''re using and don''t use the quotes.

change the "Working directory" to "./bin"

now click the "Link" tab and change the "Output file name" to "./bin/mygame.exe" as well.

this will put your exe in the bin directory and run it from that directory. keep your images and things in that directory as well and everything will run fine, plus you never have to do any copying of images/exe''s anymore.

hope this helps.

- Mike

Share this post


Link to post
Share on other sites