#COMPILE EXE ["filename"]#COMPILE DLL ["filename"]
The #COMPILE directive specifies the output target type for the compilation. It must appear before any executable code in the source file. PBXA64 supports two target types:
If no filename is specified, the output file takes the name of the source file with the appropriate extension.
| Parameter | Description |
|---|---|
"filename" | Optional. Specifies the output filename enclosed in double quotes. Must include the appropriate extension (.exe or .dll). If omitted, the source filename is used. |
' Compile as console executable with custom name
#COMPILE EXE "MyApp.exe"
FUNCTION PBMAIN() AS LONG
PRINT "Hello from PBXA64!"
FUNCTION = 0
END FUNCTION
#COMPILE directive must be placed near the top of the source file, before any FUNCTION, SUB, or executable statements.#COMPILE directive is allowed per source file.EXPORT modifier.#COMPILE selects EXE or DLL output. The command-line option --target=win32 selects x86/i686 PE32; --target=win64 selects x64 PE32+.#COMPILE SLL or legacy 16-bit targets.