Generate C source

Raspberry PI specific forum
User avatar
em_uk
Enthusiast
Enthusiast
Posts: 366
Joined: Sun Aug 08, 2010 3:32 pm
Location: Manchester UK

Generate C source

Post by em_uk »

Loving PB for armhf!

Is it possible to generate the C source created by pbcompiler?

I am writing programs on Bullseye and then running on stretch (its like an embedded system so no easy way to upgrade).

Basic console exe work great however if I am linking to libs such a pigpio they get tied to a later version of GLIBC and having the C output would mean I could compile on the target OS.

I've looked at the docs for pbcompile but when ran manually it complains

Code: Select all

pi@raspberrypi:~/Downloads/purebasic/compilers $ ./pbcompiler -c /tmp/PB_EditorOutput.pb 
PureBasic 6.00 Beta 1 - C Backend (Linux - arm32)
Loading external modules...
Error: Can't load OS libraries, please re-install PureBasic.
----

R Tape loading error, 0:1
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: Generate C source

Post by Marc56us »

To compile in commmode line, you need to set PUREBASIC_HOME to you PB root dir

Code: Select all

$ export PUREBASIC_HOME=~/Downloads/purebasic
(not needed when use IDE)
User avatar
em_uk
Enthusiast
Enthusiast
Posts: 366
Joined: Sun Aug 08, 2010 3:32 pm
Location: Manchester UK

Re: Generate C source

Post by em_uk »

Awesome thanks - that works perfect.
----

R Tape loading error, 0:1
Post Reply