Jump to content
  • Advertisement


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


Runs in C++ but not with exe

This topic is 5966 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

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.



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.


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:

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

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!