Making a stand-alone-executable

Hey, there! I'm trying to make an exectuable for my OpenGL game that I need to submit to my teacher. I'm currently using VS 2008 for building and compiling, but if I take the executable out of the project folder and on to the desktop, then it breaks. I had a simpler opengl program that rendered orbiting planets that didn't have this problem so I'm guessing my dependent files arent being linked(?).

Heres my project folder

heres an image of my project folder:

http://i803.photobucket.com/albums/yy315/Chronophile/Capture13.jpg?t=1306489168



and the visual9 folder with all the extra files that are read from and written too (called dependencies I think?)

http://i803.photobucket.com/albums/yy315/Chronophile/Capture12.jpg?t=1306489222




So, any help with getting VS to make me a stand alone executable would be much appreciated!


thanks

Will
Do you load any gfx or sfx? If you do, then those need to be in the same directory as your executable. The project files you call 'dependencies' aren't actually dependencies. They just tell Visual C++ how to open, compile, link and debug your files. You don't need them to run the program.
What do you mean with "it breaks"?
When I said it breaks I meant that it starts up but imediately says that the file visualstudio9.0\vc\include\list has an error expression list iterator not dereferencable.


All the files I'm using are seen in those 2 folder images. So the main external libraries is glut, but I think thats in the right place.
visualstudio9.0\vc\include\list has an error expression list iterator not dereferencable.
Umm...

You mean when you try and build, debug or open the project? That looks like a compiler error.

A runtime error won't generate that message, it will just say "[program] has stopped working, needs to close", or something along those lines.
No, its a runtime error. My output screen loads the title screen but after hitting space bar to move to the next screen it gives me that message with an "abort", "ignore" or "retry" option. My debuging output says the image files were loaded then the the error. So, I'm guessing that's occurs when the first list iterator is trying to be used. I don't understand why it wouldn't complain when running from inside the bin\ debug folder but it would when I put the .exe on the desktop...
If you click retry, you'll be prompted to debug the program. Do so. The error is saying that you're trying to dereference an invalid iterator. The debugger will point to the offending line. Work backwards from there.
My best guess: You're doing something like *(list.begin()) without checking if list is empty, and the list is filled with data from one or more of the files in the directory you moved the executable out of.
Topic archived. No new replies allowed.