Jump to content
  • Advertisement
Sign in to follow this  
judge dreadz

creating executable programs

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

i'm confused about exe files. i thought the idea of an exe file was that it was self contained and you could run it anywhere. i put my exe in a folder with the dlls and tried running it on some different computers. it didnt work on any of them. most of them gave a windows "illegal operation" error message and wouldnt even run the file. one machine ran the file but it failed immediately and exited. how can i create a file that i know will work when i hand it in to my tutor? the program uses dev-c++, opengl and Cg.

Share this post


Link to post
Share on other sites
Advertisement
An .exe is not standalone unless it has no datafile or dll dependancies.

You need to have all the files that the program depends upon, and in the proper places. If you open a file for from a specific folder, it will bomb on a user's machine eg: "c:\code\myprogram\config.dat"

Also, it's possible you are just trying to do something that he other machine can't do. You didn't check that certain things were supported. You said CG, did you check the other machine to make sure it had all the caps for shaders and whatever you are using?

Using OpenGL extensions without making sure the user's machine can use them in your code is a sure way to get an AV in a hurry.

Share this post


Link to post
Share on other sites
Does your program use any other files(bitmaps,sounds,etc...)? You have to include those as well, along with the .dll's.

Edit: I'm always beaten, you guys are too fast.

Share this post


Link to post
Share on other sites
maybe there are some data files missing, or maybe the computers you've tried your program on dont have a video card that supports vertex programs?

Share this post


Link to post
Share on other sites
The executable is just the "core" element of the program as a whole, the main instructions. If there are any grapics you made (outside main code), textures, music, anything eles: they must be present and findable by the executable.

Also, the exe you made (with openGL) is dependent on openGL libraries, so the target machine must have openGL runtime installed.

There could always be other issues with this as well, such that the target machine doesn't support the video setting you used.

When you run the .exe in the build directory (when you compile)? If it doesn't, but it does run when you run it from the compiler, my first suggestion is to start copying the resources you used (such as graphic files, or other libraries) into that directory until it DOES run. Then try that whole folder on another machine for the next test step.

Edit: Yeah, you guys are fast

Share this post


Link to post
Share on other sites
Quote:
Original post by Vampyre_Dark
Using OpenGL extensions without making sure the user's machine can use them in your code is a sure way to get an AV in a hurry.



yes this could be it. i have used quite a lot of relatively new openGL extensions. there are no image files or database files and i've tried running on machines with top level grpahics cards. forgive me for being stupid, but how do i go about fixing this? i dont really understand what openGL extensions are or how they work. is there s package i need to install on the target machine or something?

Share this post


Link to post
Share on other sites
Quote:
Original post by judge dreadz
yes this could be it. i have used quite a lot of relatively new openGL extensions. there are no image files or database files and i've tried running on machines with top level grpahics cards. forgive me for being stupid, but how do i go about fixing this? i dont really understand what openGL extensions are or how they work. is there s package i need to install on the target machine or something?


Windows is stuck @ GL 1.1, so an extensions are just normal functions from a later versions of OpenGL, or third party additions which are yet to be added into the core opengl library. They are supported via the video card drivers and the hardware if it has support for these features.

You need to query the driver for extension support and then react accordingly. GLEE can make this easier for you. http://elf-stone.com/ It's an easy to use extension library.

Share this post


Link to post
Share on other sites
so when it didnt work on the machine with the 6800 in it (i run a 6600 at home), could that just be that the gfx card drivers were out of date?

Share this post


Link to post
Share on other sites
so when it didnt work on the machine with the 6800 in it (i run a 6600 at home), could that just be that the gfx card drivers were out of date?

Share this post


Link to post
Share on other sites
that is possible, or you have some dll for the functionality you installed as part of an SDK which is lacking on the other machine.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!