Workarround generate .ASM in PB V3.30

Linux specific forum
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by pbdep.


Hiya all,

In PB v3.30 [LINUX] its not possible to use the -c with the pbcompiler, well yes its possible to use it but output of the
file is put into /tmp/pb-xxxxxx and afterwards deleted.

Here a little trick that alows you
to fetch the PureBasic.asm under linux of your program.

run the following from a second console or in the background ->

while true; do sleep 1;cp /tmp/pb-*/Pure* /yourdir ;done
; replace yourdir with where to store the files

Now when compiling a PB file its going very quick so you
wont be able to simply fetch the files from /tmp/pb-xxxx,
like -> /pcompiler -c test.pb

Instead you must create a delay , who to do that?
Simply use the [strace] command, also allows you to see exec of pbcompiler.

So compiling the PB file you must run the following:
/strace pbcompiler -c test.pb

You will see a long list of executions, but dont worry.
You will finaly find the PureBasic.o and PureBasic.asm in
the yourdir directory.

Greetings, And A Happy 2003!
Norman.