Sign in to follow this  

Creating an executable

This topic is 3853 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 guys, im a degree student in games development, Had a bit of trouble this year when i was handing in one of my coding assignments. I could not get the game to run off the disk. Usually when i want to look at one of my games i can just go to debug folder and click the .exe file there. However, when i put all the files (.sln, .obj, .cpp etc....) files on the disk the game wouldnt run. Had to have my lecturer take the code and compile it himself. Can anyone shed any light on how to create an executable without having to compile again and again on different machines P.S. Im using Visual Studio 2005.

Share this post


Link to post
Share on other sites
Quote:
Original post by anothrguitarist
Do you have all of your resources with the exe (that is, if you have resources)?


yea, i have all the resources in a folder thats linked to the file, when i added them to the disk i had the media folder in this folder with the executable in the debug folder

Folder Image

Share this post


Link to post
Share on other sites
Quote:
Original post by anothrguitarist
I wish I could help, but I don't know the answer. I don't want to lead you in the wrong direction either, so I'll leave it up to the more able members help you.

Good luck.


Thanks anyway mate, ;-)

Share this post


Link to post
Share on other sites
.cpp and .h files are text files that contain your code. They do nothing for the final .exe, and you don't want to be distributing them (unless you want to, so people can modidy your code).

.obj are object code files. An in-between format from cpp to .exe. The linker takes all you object files, and links them into 1 executable file. You do not distribute these with your final .exe either.

Usually, under default settings, MSVC will put your debug .exe in a debug subfolder, and a release .exe in the release subfolder.

I can see you have a debug folder. Your debug build .exe should be in there. You don't actually want to be distributing debug builds either (and I think there might be something in the EULA against it, but don't quote me on that!).

You want to make a release config, and compile a release mode executable. Distribute this, along with any other external files you need to load, and make sure the folder structure stays the same on your distribution media.

Share this post


Link to post
Share on other sites

This topic is 3853 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this