Author Topic: Command line to create EXE's ?  (Read 4428 times)

0 Members and 1 Guest are viewing this topic.

Offline mynameispaul

  • Newbie
  • Posts: 49
    • View Profile
Command line to create EXE's ?
« 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.

Offline Richard Frost

  • Seasoned Forum Regular
  • Posts: 316
  • Needle nardle noo. - Peter Sellers
    • View Profile
Re: Command line to create EXE's ?
« Reply #1 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.
It works better if you plug it in.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Command line to create EXE's ?
« Reply #2 on: March 13, 2022, 04:57:56 am »
@mynameispaul

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

Offline wiggins

  • Newbie
  • Posts: 34
    • View Profile
Re: Command line to create EXE's ?
« Reply #3 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

Offline zaadstra

  • Newbie
  • Posts: 78
    • View Profile
Re: Command line to create EXE's ?
« Reply #4 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.