QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: mynameispaul on March 12, 2022, 04:30:19 pm

Title: Command line to create EXE's ?
Post by: mynameispaul on March 12, 2022, 04:30:19 pm
Just wondering if there is a way to create EXE's with QB64 using something like a command line?

Curious if its possible to do this so multiple EXE's can be created one after another.

I think old QB4.0 and/or QB4.5 used to have this option.
Title: Re: Command line to create EXE's ?
Post by: Richard Frost on March 12, 2022, 10:32:59 pm
qb64 -x sourcefile

The .bas extension is not required.

If you want to compile more than one file, use the above template in a batch file.
Title: Re: Command line to create EXE's ?
Post by: Petr on March 13, 2022, 04:57:56 am
@mynameispaul

You can also use QB64 /? for view more options (switches).
Title: Re: Command line to create EXE's ?
Post by: wiggins on March 15, 2022, 09:24:50 pm
I've used this command to compile tons of QB64 programs from a batch file. 
qb64 -x sourcefile
Title: Re: Command line to create EXE's ?
Post by: zaadstra on March 29, 2022, 03:03:26 pm
@mynameispaul

You can also use QB64 /? for view more options (switches).

I tried that but is appears to be QB64 -?

Code: Text: [Select]
  1. >D:\qb64-2.0.1\qb64.exe -?
  2. QB64 Compiler V2.0.1
  3.  
  4. Usage: qb64 [switches] <file>
  5.  
  6. Options:
  7.   <file>                  Source file to load
  8.   -c                      Compile instead of edit
  9.   -o <output file>        Write output executable to <output file>
  10.   -x                      Compile instead of edit and output the result to the
  11.                              console
  12.   -w                      Show warnings
  13.   -q                      Quiet mode (does not inhibit warnings or errors)
  14.   -m                      Do not colorize compiler output (monochrome mode)
  15.   -e                      Enable OPTION _EXPLICIT, making variable declaration
  16.                              mandatory (per-compilation; doesn't affect the
  17.                              source file or global settings)
  18.   -s[:switch=true/false]  View/edit compiler settings
  19.   -l:<line number>        Start the IDE at the specified line number
  20.   -p                      Purge all pre-compiled content first
  21.   -z                      Generate C code without compiling to executable
  22.