Missing PBCompiler parameters

Found an issue in the documentation ? Please report it here !

Moderator: Documentation Editors

User avatar
Sicro
Enthusiast
Enthusiast
Posts: 538
Joined: Wed Jun 25, 2014 5:25 pm
Location: Germany
Contact:

Missing PBCompiler parameters

Post by Sicro »

Missing parameters in the PB help:
  • -ls, --liststructures
    Creates a file with all the structures
  • -lf, --listfunctions
    Creates a file with all the functions
  • -li, --listinterface
    Creates a file with all the interfaces
  • -lp, --listpath
    Set the output path for the above lists commands
  • -qs, --querystructure <name>
    Creates a file with the definition
  • -ds, --debugsymbols
    Add standard debug symbols to executable
The missing compiler parameters also no longer work under Windows.

Under my Linux:

Code: Select all

$ pbcompiler --help
USAGE: pbcompiler <sourcefile>

OPTIONS:
  -c, --commented         Produce commented asm output (purebasic.asm)
  -d, --debugger          Enable debugger
  -t, --thread            Enable threadsafe support
  -e, --executable <file> Create executable to <file>
  -i, --import <file>     Create import file to <file>
  -r, --resident <file>   Create resident file to <file>
  -ir, --ignoreresident <file>
                          Ignore the given resident <file>
  -q, --quiet             Display only error on the standard output
  -sb, --standby          Starts compiler in standby mode (remote control)
  -pf, --purifier         Enable purifier
  -ls, --liststructures   Creates a file with all the structures
  -lf, --listfunctions    Creates a file with all the functions
  -li, --listinterfaces   Creates a file with all the interfaces
  -lp, --listpath         Set the output path for the above lists commands
  -qs, --querystructure <name>
                          Creates a file with the definition
  -s, --subsystem <name>  Uses the specified subsystem
  -so, --sharedobject <file>
                          Create a dynamic library (shared object)
  -dc, --dynamiccpu       Create a executable with all processor specific routines
  -mmx, -3dnow, -sse, -sse2
                          Create a processor specific executable
  -l, --linenumbering     Enable line numbering support for OnError
  -o, --constant Name=Value
                          Declare a new constant at compile time
  -g, --language          Set the language of the compiler error messages
  -ds, --debugsymbols     Add standard debug symbols to executable
  -k, --check             Check the syntax only, doesn't create/launch the executable
  -pp, --preprocess <file>
                          Creates a single file with all macros expanded and all sources files included
  -v, --version           Display the compiler version
Under my WindowsXP:

Code: Select all

>pbcompiler.exe --help

PBCompiler "Filename"

Command switches:
--------

/DEBUGGER: Enable the debugger
/EXE "Filename": Create an executable to the given filename
/DLL: Create a DLL
/CONSOLE: Create a console executable
/ICON "Filename": Add an icon to the executable
/RESOURCE "Filename": Add a resource file (.rc) to the executable
/QUIET: Disable all unnecessary textoutput
/COMMENTED: Produce a commented asm output (PureBasic.asm)
/REASM: Compile the 'PureBasic.asm' file to an executable
/XP: Add the Windows XP theme support to the executable
/DPIAWARE: Enable DPI support to the executable
/USER: Add the 'User' hint to the executable (Windows Vista)
/ADMINISTRATOR: Add the 'Administrator' hint to the executable (Windows Vista and above)
/IMPORT "Filename": Create a import file to the given filename
/RESIDENT "Filename": Create a resident file to the given filename
/IGNORERESIDENT "Filename": ignore the given resident
/LINENUMBERING: Enable line numbering in the final executable for OnError
/STANDBY: Wait for external commands (editor, scripts...)
/MMX, /3DNOW, /SSE or /SSE2: Create a processor specific executable
/DYNAMICCPU: Create a executable containing all processor specific routines
/THREAD: Use thread safe runtime for strings and general routines
/PURIFIER: Enable the purifier
/SUBSYSTEM "Name": Use this subsystem to replace a set of internal functions
/CONSTANT Name=Value: Declare a new constant at compile time
/LINKER "ResponsFile": Specify a commands file to be passed to the linker
/CHECK: Check the syntax only, doesn't create/launch the executable
/PREPROCESS "Filename": Creates a single file with all macros expanded and all sources files included
/LANGUAGE "Language": Uses the specified language for the compiler
/VERSION: Display the version of the compiler
Image
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Missing PBCompiler parameters

Post by Andre »

Something Fred should check/confirm, and change the docs accordingly...
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Missing PBCompiler parameters

Post by Andre »

Is this still an issue with PB6.02 and newer? (or mentioned parameters not or no longer available and so also not mentioned in the docs?)
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Sicro
Enthusiast
Enthusiast
Posts: 538
Joined: Wed Jun 25, 2014 5:25 pm
Location: Germany
Contact:

Re: Missing PBCompiler parameters

Post by Sicro »

On Windows:

Code: Select all

> pbcompiler --version
PureBasic 6.03 beta 8 LTS (Windows - x64) - (c) 2023 Fantaisie Software

> pbcompiler --help

pbcompiler "Filename"

Command switches:
--------

/DEBUGGER: Enable the debugger
/OUTPUT "Filename": Create an executable or a dll to the given filename
/DLL: Create a DLL
/CONSOLE: Create a console executable
/ICON "Filename": Add an icon to the executable
/OPTIMIZER: Enable the code optimizer
/RESOURCE "Filename": Add a resource file (.rc) to the executable
/QUIET: Disable all unnecessary textoutput
/COMMENTED: Produce a commented asm output (purebasic.asm)
/REASM: Compile the 'purebasic.asm' file back to an executable
/XP: Add the Windows XP theme support to the executable
/DPIAWARE: Enable DPI support to the executable
/USER: Add the 'User' hint to the executable (Windows Vista)
/ADMINISTRATOR: Add the 'Administrator' hint to the executable (Windows Vista and above)
/IMPORT "Filename": Create a import file to the given filename
/RESIDENT "Filename": Create a resident file to the given filename
/IGNORERESIDENT "Filename": ignore the given resident
/LINENUMBERING: Enable line numbering in the final executable for OnError
/STANDBY: Wait for external commands (editor, scripts...)
/MMX, /3DNOW, /SSE or /SSE2: Create a processor specific executable
/DYNAMICCPU: Create a executable containing all processor specific routines
/THREAD: Use thread safe runtime for strings and general routines
/PURIFIER: Enable the purifier
/SUBSYSTEM "Name": Use this subsystem to replace a set of internal functions
/CONSTANT Name=Value: Declare a new constant at compile time
/LINKER "ResponsFile": Specify a commands file to be passed to the linker
/CHECK: Check the syntax only, doesn't create/launch the executable
/PREPROCESS "Filename": Creates a single file with all macros expanded and all sources files included
/LANGUAGE "Language": Uses the specified language for the compiler
/VERSION: Display the version of the compiler

> pbcompiler --listfunctions
--listfunctions: Unknown switch
The help still does not mention the parameters "--listfunctions" etc.

On Linux:

Code: Select all

$ ./pbcompiler --version
PureBasic 6.03 beta 8 LTS (Linux - x64) - (c) 2023 Fantaisie Software

$ ./pbcompiler --help
USAGE: pbcompiler <sourcefile>

OPTIONS:
  -c, --commented         Produce commented asm output (purebasic.asm)
  -d, --debugger          Enable debugger
  -t, --thread            Enable threadsafe support
  -z, --optimizer         Enable the code optimizer
  -o, --output <file>     Create executable or dll to <file>
  -i, --import <file>     Create import file to <file>
  -r, --resident <file>   Create resident file to <file>
  -ir, --ignoreresident <file>
                          Ignore the given resident <file>
  -q, --quiet             Display only error on the standard output
  -sb, --standby          Starts compiler in standby mode (remote control)
  -pf, --purifier         Enable purifier
  -ls, --liststructures   Create a file with all the structures
  -lf, --listfunctions    Create a file with all the functions
  -li, --listinterfaces   Create a file with all the interfaces
  -lp, --listpath         Set the output path for the above lists commands
  -qs, --querystructure <name>
                          Creates a file with the definition
  -s, --subsystem <name>  Uses the specified subsystem
  -ra, --reasm            Compile the 'purebasic.asm' file back to an executable
  -so, --sharedobject <file>
                          Create a dynamic library (shared object)
  -dc, --dynamiccpu       Create a executable with all processor specific routines
  -mmx, -3dnow, -sse, -sse2
                          Create a processor specific executable
  -l, --linenumbering     Enable line numbering support for OnError
  -co, --constant Name=Value
                          Declare a new constant at compile time
  -g, --language          Set the language of the compiler error messages
  -ds, --debugsymbols     Add standard debug symbols to executable
  -k, --check             Check the syntax only, doesn't create/launch the executable
  -pp, --preprocess <file>
                          Create a single file with all macros expanded and all sources files included
  -v, --version           Display the compiler version
  
$ ./pbcompiler --listfunctions
PureBasic 6.03 beta 8 LTS (Linux - x64)
Loading external modules...
Can't create file '/pbfunctions.txt'.
The help still does not mention the parameters "--listfunctions" etc.

New is now "Can't create file '/pbfunctions.txt'."
I think the new prefixed slash prevents the file now from being created successfully.

Code: Select all

$ pbcompiler --version
PureBasic 6.02 LTS (Linux - x64) - (c) 2023 Fantaisie Software

$ pbcompiler --listfunctions
PureBasic 6.02 LTS (Linux - x64)
Loading external modules...
On Linux with PB version 6.02 LTS a "pbfunctions.txt" file is created.
Image
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Missing PBCompiler parameters

Post by Andre »

The help still does not mention the parameters "--listfunctions" etc.
True. This and the other comments is something Fred must look at....
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Missing PBCompiler parameters

Post by Andre »

In the PB6.10 docs I found several new descriptions about liststructures, listfunctions, listinterfaces, querystructures.... are there still missing some?
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Sicro
Enthusiast
Enthusiast
Posts: 538
Joined: Wed Jun 25, 2014 5:25 pm
Location: Germany
Contact:

Re: Missing PBCompiler parameters

Post by Sicro »

Tested with PureBasic 6.10 beta 6


On Windows

I miss this parameter in the output of "pbcompiler --help" under "Windows specific options":
/DLLPROTECTION: Enable DLL preloading protection to the executable. It prevents that system DLLs are first searched for in the program directory instead of in the System32 directory of the Windows operating system. This option is not XP compatiable.

On Linux

I miss this parameter in the help under "Linux specific command switches":
-ds, --debugsymbols
Add standard debug symbols to executable
"pbcompiler --help" shows the above parameter in "Cross-platform options", which I think is wrong, at least there is no such parameter in the Windows version of PureBasic.

I miss this parameter in the output of "pbcompiler --help":
-h, --help: displays a quick help about the compiler.

By the way, "pbcompiler --liststructures --output structures.txt" and the other list parameters now work under Windows and Linux:

Code: Select all

pbcompiler --liststructures --output structures.txt
PureBasic 6.10 beta 6 (Linux - x64)
Loading external modules...
File 'structures.txt' successfully created.

Code: Select all

'C:\Program Files\PureBasic\Compilers\pbcompiler.exe' --liststructures --output structures.txt
PureBasic 6.10 beta 6 (Windows - x64)
Loading external libraries...
File 'structures.txt' successfully created.
Image
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Missing PBCompiler parameters

Post by Andre »

Thank you, Sicro! :)

@Fred/freak: could you please check, what's the intended behaviour on each PB platform and what should be changed/added in the reldated documentation. Thanks!
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply