Jump to content
  • Advertisement


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


Works from IDE, not from command line

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

Anyone ever seen this? I''ve been developing my OpenGL program in VS.NET 2003, C++. When I press F5 to try it out, it works just fine. I was doing some stuff in the Command Prompt, and attempted to run the program from the command line. It fails when trying to initialize OpenGL. So I switch back to the IDE, and it works just fine from there. What gives? BTW, my code is based on NeHe''s basic framework, the program is bombing right here:
	if (!InitGL())									// Initialize Our Newly Created GL Window

		KillGLWindow();								// Reset The Display

		MessageBox(NULL,"Initialization Failed.","ERROR",MB_OK|MB_ICONEXCLAMATION);
		return FALSE;								// Return FALSE


Share this post

Link to post
Share on other sites
Ok, I figured out why it was crashing, although it still confuses me - must be VS debug thing...

Anyway, I'm building the project in the debug configuration, so the *.exe gets built in the /Debug folder under your project. The funny thing about pressing F5 to run the program is that it runs "as though it were in the project folder, not the debug folder". That is, let's say you load an image like this:


That "Data" folder has to be in the project directory, not the Debug directory.

However, if you run the *.exe directly, either by clicking on it, or from the command line, it runs like it should, and looks for files starting from the folder the *.exe is in.

Since my data files were in the project folder, the *.exe file in the /Debug folder couldn't find them, and the program just exited.


[edited by - toddhd on June 10, 2004 4:20:23 PM]

[edited by - toddhd on June 10, 2004 4:21:19 PM]

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!