How to make an executable

BlitzMax Forums/BlitzMax Programming/How to make an executable

Twinprogrammer(Posted 2011) [#1]
Hey Guys,

Just wondering how to make my program a .EXE file. Because when ever I try to run my game on a different computer, it crashes !!

Twinprogrammer


Gabriel(Posted 2011) [#2]
Your program is always an exe file. There is no other way for it to exist. If you're asking why it works on one computer and not another, there could be hundreds of different reasons and without any information at all, it's hard to diagnose.

The first thing that springs to mind is that you're distributing only the executable and not all the data files it uses. If that were the case, you would have to look into either using IncBin to incorporate the media into the executable or perhaps distribute the data files.

I wouldn't want to begin going through all the other possibilities without more information, but that one is a good place to start.


xlsior(Posted 2011) [#3]
Also keep in mind not to hard-code the locations of the data files: Even if you put it all together in a zip file, if you're trying to load "c:\files\myfile.jpg" and you put everything in a different folder on the other computer, it won't be able to find the file you want and crash.


dynaman(Posted 2011) [#4]
How are you trying to run the program on the other computer? You must have created an exe in order to try and run it on another machine.

In addition to what the others have said the other computer might not have the needed graphics card to run the program, or a dll is missing, or a whole host of other possible problems.


H&K(Posted 2011) [#5]
Because when ever I try to run my game on a different computer
By different computer do you mean "it runs on a mac but not a pc?" for example?

If so you need to run Bmax on each "computer type" and make a different exe on each. (Ie PC, Linus, and I think two different mac types)


Twinprogrammer(Posted 2011) [#6]
I mean on a different windows

twinprogrammer


ICECAP(Posted 2011) [#7]
TwinProgrammer, its very hard to help people diagnose problems without knowing exactly whats happening and without seeing code.
Its sort of like ringing up a car mechanic and telling him your car is broken.
We need more information.
What version of windows is it not working on?
Are you running the debug exe or the final exe?
What happens exactly, does it crash with an error?
And if you are feeling brave, show us some code so we can have a look through and check if there is a problem with referencing.

With more information, we can be more helpful.