(Linux Slackware 14.2 - Purebasic 5.62 x64 in ~/Documents/purebasic)
Hello.pb
Code: Select all
OpenConsole()
PrintN("Hello World")
Input()
$ PS1='\w \$ '
~/Documents $ purebasic/compilers/
pbcompiler Hello.pb
******************************************
PureBasic 5.62 (Linux - x64)
******************************************
Loading external modules...
Error: Can't load OS libraries, please re-install PureBasic.
~/Documents $
export PUREBASIC_HOME=~/Documents/purebasic
~/Documents $
echo $PUREBASIC_HOME
/home/marc/Documents/purebasic
~/Documents $ purebasic/compilers/
pbcompiler Hello.pb -e Hello
******************************************
PureBasic 5.62 (Linux - x64)
******************************************
Loading external modules...
Starting compilation...
Starting compilation...
4 lines processed.
Creating the executable.
- Feel the ..PuRe.. Power -
~/Documents $
file Hello
Hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, stripped
~/Documents $
./Hello
Hello World
You need to set PUREBASIC_HOME to purebasic
root folder even if you compile from compiler folder
but it is not executed, a file purebasic.out is created
So it's works.
purebasic.out is the name of the compiled file if you don't specify -e
The compiler (command line) does not launch executable after compiling.
You need to launch it yourself (./purebasic.out)
Remember that under unix, there is no PATH on the local directory (security). You must specify the full name or (./name) to launch a program.
Edit: Hum, sometime executable is launch after compiling
Reset for testing
$ PS1='[\w \$] '
[~/Documents $] cd ~/Documents/
[~/Documents $] export PUREBASIC_HOME=
[~/Documents $] echo $PUREBASIC_HOME
(nothing)
[~/Documents $] purebasic/compilers/pbcompiler Hello.pb
******************************************
PureBasic 5.62 (Linux - x64)
******************************************
Loading external modules...
Error: Can't load OS libraries, please re-install PureBasic.
[~/Documents $]
export PUREBASIC_HOME=~/Documents/purebasic
[~/Documents $] echo $PUREBASIC_HOME
/home/marc/Documents/purebasic
(yes)
[~/Documents $] purebasic/compilers/pbcompiler Hello.pb
******************************************
PureBasic 5.62 (Linux - x64)
******************************************
Loading external modules...
Starting compilation...
Starting compilation...
4 lines processed.
Creating the executable.
- Feel the ..PuRe.. Power -
Hello World