When I install GCBASIC on my winXP x64 SP3 box, towards the end of the install it says
"Unable to execute file:
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\is-NSBEO.tmp\mkcompil.exe
CreateProcess failed; code 216.
The image file %1 is valid, but is for a machine type other than the current machine."
If I hit okay, the install finishes as normal, but I have no compile.bat, which is a problem, because without that, I'm pretty sure I can't do anything.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried using freebasic (0.20.0b with -lang qb, it wouldn't compile otherwise and 0.16b) to recompile mkcompil.bas and use that, just running it did nothing (ran fine, didn't make a compile.bat), so I tried replacing the one in the temp file created by the installer with a read only version of mine. This time the installer whined about the fact that it couldn't make mkcompil.exe, but I hit ignore, and it ran it (the cmd window popped up momentarily) without errors, but still no compile.bat.
If somebody wouldn't mind, could you post your compile.bat here (and any other BAT files it needs, I have none), I know enough about bat files that I'm sure I could adapt it to my install, I just need somewhere to start.
Out of curiosity, what compiler is used to make the windows version of gcbasic? I know a guy who has Visual Studio, so if that's it, could I theoretically recompile it using his and get a mkcompil that works and a compile.bat?
Or am I completely out in nowhere barking up the wrong tree. There's a couple other threads in this forum about this error (lack of a compile.bad), but none of them are very specific, and none of them get resolved.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Extract it to your GCBASIC install directory and run it. If you're using the version of GCBASIC straight out of the installer, you'll have to change the assembler to gputils - type 5, press ENTER, type 3, press ENTER. To save and exit, type 7 and press ENTER. A suitable compile.bat file should be produced.
GCBASIC was originally compiled with QBASIC, but I ported it to FreeBASIC in late 2006. GCBASIC 0.9.3.0 is compiled with FreeBASIC 0.16b (natively using the fb dialect, not qb). The version of GCBASIC in update.zip (the latest build, http://gcbasic.sourceforge.net/newfiles/update.zip\) is compiled with FreeBASIC 0.18b. It can also be compiled with 0.20b, I had a go a few days back and there were no problems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, tried that, and it produced a compile.bat, but said compile.bat does not work.
Here is what I get:
@ECHO OFF
C:
cd \Program Files (x86)\GCBASIC\
GCBASIC %1 /O:compiled.asm /A:"""C:\Program Files\gputils\bin\gpasm"" -i -w2 ""%FN_NOEXT%.asm"" >""%FN_NOEXT%.err"""
The first problem is that it assumes gputils is in Program Files, which on my computer, it isn't, it's in Program files (x86), I changed that, and it still didn't work, what happens when I drag files onto it is that a command prompt shows up and displays the same thing that GCBASIC.exe would if I just ran it with no arguments. It also looks like there's too many quotes. I know BASH scripting relatively well, but precious little about batch files, so that could just be something that's different between the languages.
I'm going to try messing with it a bit further later, but for now I've got other stuff to do, I'll get back this evening on my successes or failures.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Option 1: Use these three files, altered to suit your setup:
compile.bat:
@ECHO OFF
C:
cd "\Program Files\GCBASIC"
GCBASIC /NC %1 /O:compiled.asm /A:makeasm.bat /P:download.bat
makeasm.bat:
@ECHO OFF
"C:\Program Files\gputils\bin\gpasm" -i -w2 compiled.asm >compiled.err
del compiled.cod>nul
download.bat:
@ECHO OFF
REM Add the command to call your programmer application here
REM (The file to download will be called COMPILED.HEX)
Option 2: Update to the newest build of GCBASIC (http://gcbasic.sourceforge.net/newfiles/update.zip), and then create a file in the GCBASIC install directory named gcbasic.ini with these lines in it:
Assembler = GCASM
Output = compiled.asm
Then, drag and drop your programs on to gcbasic.exe. The updated version reads its settings from gcbasic.ini, so there's no need for compile.bat. With the above settings, GCBASIC will use its own internal assembler rather than gputils.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I install GCBASIC on my winXP x64 SP3 box, towards the end of the install it says
"Unable to execute file:
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\is-NSBEO.tmp\mkcompil.exe
CreateProcess failed; code 216.
The image file %1 is valid, but is for a machine type other than the current machine."
If I hit okay, the install finishes as normal, but I have no compile.bat, which is a problem, because without that, I'm pretty sure I can't do anything.
I tried using freebasic (0.20.0b with -lang qb, it wouldn't compile otherwise and 0.16b) to recompile mkcompil.bas and use that, just running it did nothing (ran fine, didn't make a compile.bat), so I tried replacing the one in the temp file created by the installer with a read only version of mine. This time the installer whined about the fact that it couldn't make mkcompil.exe, but I hit ignore, and it ran it (the cmd window popped up momentarily) without errors, but still no compile.bat.
If somebody wouldn't mind, could you post your compile.bat here (and any other BAT files it needs, I have none), I know enough about bat files that I'm sure I could adapt it to my install, I just need somewhere to start.
Out of curiosity, what compiler is used to make the windows version of gcbasic? I know a guy who has Visual Studio, so if that's it, could I theoretically recompile it using his and get a mkcompil that works and a compile.bat?
Or am I completely out in nowhere barking up the wrong tree. There's a couple other threads in this forum about this error (lack of a compile.bad), but none of them are very specific, and none of them get resolved.
mkcompil.exe is compiled with QBASIC. I last updated it back in mid 2006, and it's really a museum piece now. It's replacement will be this program:
http://gcbasic.sourceforge.net/temp/settings.zip
Extract it to your GCBASIC install directory and run it. If you're using the version of GCBASIC straight out of the installer, you'll have to change the assembler to gputils - type 5, press ENTER, type 3, press ENTER. To save and exit, type 7 and press ENTER. A suitable compile.bat file should be produced.
GCBASIC was originally compiled with QBASIC, but I ported it to FreeBASIC in late 2006. GCBASIC 0.9.3.0 is compiled with FreeBASIC 0.16b (natively using the fb dialect, not qb). The version of GCBASIC in update.zip (the latest build, http://gcbasic.sourceforge.net/newfiles/update.zip\) is compiled with FreeBASIC 0.18b. It can also be compiled with 0.20b, I had a go a few days back and there were no problems.
Okay, tried that, and it produced a compile.bat, but said compile.bat does not work.
Here is what I get:
@ECHO OFF
C:
cd \Program Files (x86)\GCBASIC\ GCBASIC %1 /O:compiled.asm /A:"""C:\Program Files\gputils\bin\gpasm"" -i -w2 ""%FN_NOEXT%.asm"" >""%FN_NOEXT%.err"""
The first problem is that it assumes gputils is in Program Files, which on my computer, it isn't, it's in Program files (x86), I changed that, and it still didn't work, what happens when I drag files onto it is that a command prompt shows up and displays the same thing that GCBASIC.exe would if I just ran it with no arguments. It also looks like there's too many quotes. I know BASH scripting relatively well, but precious little about batch files, so that could just be something that's different between the languages.
I'm going to try messing with it a bit further later, but for now I've got other stuff to do, I'll get back this evening on my successes or failures.
Okay, two options:
Option 1: Use these three files, altered to suit your setup:
compile.bat:
@ECHO OFF
C:
cd "\Program Files\GCBASIC"
GCBASIC /NC %1 /O:compiled.asm /A:makeasm.bat /P:download.bat
makeasm.bat:
@ECHO OFF
"C:\Program Files\gputils\bin\gpasm" -i -w2 compiled.asm >compiled.err
del compiled.cod>nul
download.bat:
@ECHO OFF
REM Add the command to call your programmer application here
REM (The file to download will be called COMPILED.HEX)
Option 2: Update to the newest build of GCBASIC (http://gcbasic.sourceforge.net/newfiles/update.zip), and then create a file in the GCBASIC install directory named gcbasic.ini with these lines in it:
Assembler = GCASM
Output = compiled.asm
Then, drag and drop your programs on to gcbasic.exe. The updated version reads its settings from gcbasic.ini, so there's no need for compile.bat. With the above settings, GCBASIC will use its own internal assembler rather than gputils.