- This topic has 3 replies, 3 voices, and was last updated 13 years, 1 month ago by Anonymous.
April 17, 2007 at 12:57 pm #5960AnonymousInactive
i know this is a silly question but it is not something i have actually had to do so far. How do i set up my demos in such a way that the exe will run on machine other than my own without the need to recompile.
April 17, 2007 at 1:22 pm #36470AnonymousInactive
In your compiler, you will probably have the option of doing a static link or a dynamic link.
With a static link, all externally referenced libraries will be included in your final exe. This will obviously increase the size of your final exe somewhat, but at least it will run on the target machine.
With a dynamic link, only the main code base is compiled into the exe, so if you plan to run it on a different machine, you gotta make sure the target machine has all the required libraries. You may have to distribute libraries with your program for it to work on other machines which in turn, may lead to some copyright issues (if you do it on a large scale!!).
The option of recompiling shouldn’t really arise when running on different machines (expect maybe with different OSs). If the target machine has all the required libraries, then a dynamic link should suffice.
April 17, 2007 at 11:00 pm #36481AnonymousInactive
Don’t forget you’ll want to do a release build for frame rate’s sake and that the paths to your resources may depend on the executable being in a particular directory. VS sorts this out for you by having a path variable in the project file to where you want the executable to be run even though it just dumps it in \runtime or \debug by default (this may explain your stuff not running outside the VS solution).
If you’re using any custom dlls (I’d imagine you are), they’ll need to be available to the executable as well, probably in the same directory as it.
Also be sure that people are going to look at the demo or source code that you most want them to see first. know that you probably have about thirty seconds to ‘wow’ them after they look through your CV and decide that the files you’ve supplied are worth checking out.
April 18, 2007 at 8:28 am #36483AnonymousInactive
it turned out to be easy enough after all i had to do was change my include and library paths in the c++directorys and make them relativeto to the project folder
c:\course work\ode\inc to
that and make sure i have included any dlls that my projects need. at least now the projects that have been compiled on my laptop now run on my desktop. might check them on my house mates laptop tonight
- The forum ‘Programming’ is closed to new topics and replies.