#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 SLL or legacy 16-bit targets.