Using the SHELL compiler
The shell compiler is located in the subdirectory 'Compilers\' from the PureBasic drawer. The easier way to access this is to add this directory in the windows PATH variable, which will give access to all the commands of this directory at all times. Several options can be specified when the compiler is lauched:
/? : display a quick help about the compiler.
/COMMENTED : create a commented '.asm' output file when creating an executable. This file can be re-assembled later when the needed modifications have been made. This option is for advanced programmers only.
/DEBUGGER : enable the debugger support.
/EXE "Filename" : create a standalone executable specified by the filename.
/ICON "IconName" : add the specified icon to the executable
/INLINEASM : enable the inline asm feature (asm routines can be written directly in the BASIC source code).
/RESIDENT "Filename" : create a resident file specified by the filename
/CONSOLE: output file in Console format. Default format is Win32.
/NT4: Enable the NT4 compliance for multimedia functions (Sprite, Keyboard, Mouse).
/DLL: output file is a DLL
/REASM: Reassemble the PureBasic.asm file into an executable. This allow to use the /COMMENTED function, modify the asm output and creates the executable again.
/QUIET: Disable all unnecessary text output, very useful when using another editor.
Example :
1) PBCompiler sourcecode.pb
The compiler will compile the source code and execute it.
2) PBCompiler sourcecode.pb /DEBUGGER /INLINEASM
The compiler will compile the source code and execute it with debugger and inline asm support.