Compiling software
Posted: Mon Dec 14, 2015 9:59 am
I have a lot of programs that I have written using QB45 but now that I have a Windoze 7 64-bit machine I have just installed QB64 on that. I am now having a couple of obvious problems using the QB64 software.
I have the QBASIC software installed in C:\QB64 and all of my source code is located in C:\SOURCE. I have a batch file called BASIC.BAT. For QB45 I simply run this as BASIC PROGRAM_NAME and this adds .BAS to PROGRAM_NAME and loads the file into the QB45 editor. I then compile the program and the .EVE file is located in C:\QB45.
I have taken BASIC.BAT and changed the directory from QB45 to QB64 and the executable file to QB64. Also, the batch file has QB64 set as one of the paths which I set (similar to the original batch file for QB45). So, the relevant part of the batch file is:
PATH C:\BATCH;C:\QB64
CD QB64
QB64 C:\SOURCE\%1.BAS /AH
DEL C:\SOURCE\*.BAK
%1 is the variable that defines the root name of the program to be compiled, PROGRAM_NAME.
Problem 1. When I run BASIC PROGRAM_NAME I get an error message to say that PROGRAM_NAME.BAS has not been found. Since QB64 is apparently fully compatible with QB45 and the command runs for QB45 I cannot see anything obviously wrong. Maybe QB64 does not accept the options /AH at the end of the command line? Or maybe it does not understand "%1.BAS" which forms the name of the file to be accessed. In any case, I can then load PROGRAM_NAME.BAS by hand.
Problem 2. I then compile the program. I see that there are just two options on the drop-down compared with QB45, but as usual I run the command to compile the source code. No error messages are generated but I can find no trace of the .EXE file on my hard disk.
Maybe I am doing something wrong that is obvious to people used to using QB64, but I am open to suggestions, please.
Many thanks in advance.
I have the QBASIC software installed in C:\QB64 and all of my source code is located in C:\SOURCE. I have a batch file called BASIC.BAT. For QB45 I simply run this as BASIC PROGRAM_NAME and this adds .BAS to PROGRAM_NAME and loads the file into the QB45 editor. I then compile the program and the .EVE file is located in C:\QB45.
I have taken BASIC.BAT and changed the directory from QB45 to QB64 and the executable file to QB64. Also, the batch file has QB64 set as one of the paths which I set (similar to the original batch file for QB45). So, the relevant part of the batch file is:
PATH C:\BATCH;C:\QB64
CD QB64
QB64 C:\SOURCE\%1.BAS /AH
DEL C:\SOURCE\*.BAK
%1 is the variable that defines the root name of the program to be compiled, PROGRAM_NAME.
Problem 1. When I run BASIC PROGRAM_NAME I get an error message to say that PROGRAM_NAME.BAS has not been found. Since QB64 is apparently fully compatible with QB45 and the command runs for QB45 I cannot see anything obviously wrong. Maybe QB64 does not accept the options /AH at the end of the command line? Or maybe it does not understand "%1.BAS" which forms the name of the file to be accessed. In any case, I can then load PROGRAM_NAME.BAS by hand.
Problem 2. I then compile the program. I see that there are just two options on the drop-down compared with QB45, but as usual I run the command to compile the source code. No error messages are generated but I can find no trace of the .EXE file on my hard disk.
Maybe I am doing something wrong that is obvious to people used to using QB64, but I am open to suggestions, please.
Many thanks in advance.