Skip to main content
gamedev.net
🔒 Locked

Creating a portable program

Started by Tempest 6 replies 200+ views
Original Post
Tempest
Tempest
Hi folks. I have created a simple game and I''m having trouble figuring out how to build it properly to try it out on my sister''s computer. When I execute the program from within MSVC++, it works as expected, however, when I have the release build completed and try to use the program using the .exe file, all I get is a blank black screen with the mouse cursor. My images apparently are not getting included in the executable. What must I do to make a complete program that I can put on a disk and use it on another computer? I am using MSVC++ 6.0
Tempest
Tempest
I ran it in debug mode throughout creation, then ran it in release mode. It ran fine either way. Just can''t figure out how to get the complete thing to workout side of Visual C++.
CaptainJester
CaptainJester
If your images are compiled into the program, then I don;t know. If you are loading your images into the program from external files, don''t forget to copy those files as well.

---
Make it work.
Make it fast.

"Commmmpuuuuterrrr.." --Scotty Star Trek IV:The Voyage Home
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][
merlin9x9
merlin9x9
I doubt you did anything to have your images put in your executable, unless you had they as resources; I suspect that they''re all external. The problem might be, then, that your program can''t find the images when it tries to load them. VC++, by default, will set up the working directory as the directory where your project is, and your executable will most likely be in the Release or Debug subdirectory. Of course, neither of those directories are the same as where you probably have your images. Hopefully, you''re not using absolute paths for loading your images, because that certainly wouldn''t work, either.
Tempest
Tempest
The images themselves are included as resources and are in the same directory as the code. They are included into the file individually so no other path is needed cor the compiler to locate them.
Tempest
Tempest
Well, I can''t figure it out at all. Thank you for the replies. I''ll keep working on it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.