Page 1 of 1

command line compiler - make a *.res file

Posted: Tue Mar 18, 2014 7:50 am
by Lebostein
I get an error while using PB command line compiler:
Error: Can't load any OSLibraries! Please re-install PureBasic.
I have tried to make a res file (test.pb was inside the compiler directory):

Code: Select all

./pbcompiler test.pb -r test.res
What is wrong? Standard compiling with IDE works.

Re: command line compiler - Error

Posted: Tue Mar 18, 2014 9:00 am
by Danilo
Did you add the following in your .bashrc or .bash_profile file?

Code: Select all

export PUREBASIC_HOME=~/PureBasic/x86/PureBasic
export PATH=$PATH:$PUREBASIC_HOME/compilers
I think PUREBASIC_HOME is required for command line compiling.

Re: command line compiler - Error

Posted: Tue Mar 18, 2014 10:12 am
by Lebostein
Thank you! That's it. :wink:

Re: command line compiler - Error

Posted: Tue Mar 18, 2014 11:16 am
by Lebostein
What is the counterpart to /IGNORERESIDENT on Mac OS?

Code: Select all

Options:
--------

-c or --commented: Produce commented asm output (purebasic.asm)
-d or --debugger: Enable the debugger
-u or --unicode: Enable unicode support
-t or --thread: Enable the threadsafe support
-e or --executable "filename": Create an executable to the given filename
-r or --resident "filename.res": Create a resident file to the given filename
-q or --quiet: Display only error on the standard output
-sb or --standby: Starts the compiler in standby mode (remote control)
-pf or --purifier: Enable the purifier
-ls or --liststructures: Creates a file with all the structures
-lf or --listfunctions: Creates a file with all the functions
-li or --listinterfaces: Creates a file with all the interfaces
-lp or --listpath: Set the output path for the above lists commands
-qs or --querystructure "name": Creates a file with the definition
-s or --subsystem "name": Uses the specified subsystem
-dl or --dylib "filename": Create a dynamic library (dylib object)
-n or --icon "iconname.icns": add the icon to the application
-f or --front: put the launched process to front
-ibp or --ignorebundlepath: don't use the bundle path as current directory
-l or --linenumbering: Enable line numbering in the final executable for OnError
-o or --constant Name=Value: Declare a new constant at compile time
-g or --language: Set the language of the compiler error messages
-ds or --debugsymbols: Add standard debug symbols to executable
-k or --check: Check the syntax only, doesn't create/launch the executable
-v or --version: Display the compiler version

Re: command line compiler - Error

Posted: Tue Mar 18, 2014 11:19 am
by Fred
-ir or --ignoreresident

Re: command line compiler - Error

Posted: Tue Mar 18, 2014 11:27 am
by Lebostein
hmm....

Is that correct?

Code: Select all

pbcompiler Lebostein.pb -r /Applications/PureBasic/residents/Lebostein.res -ir /Applications/PureBasic/residents/Lebostein.res
But PB don't ignore the old Lebostein.res....

Re: command line compiler - make a *.res file

Posted: Tue Mar 18, 2014 3:16 pm
by Fred
Should be:

Code: Select all

pbcompiler Lebostein.pb -r /Applications/PureBasic/residents/Lebostein.res -ir Lebostein.res