Page 1 of 1

Can someone clarify Compilers?

Posted: Fri Jun 06, 2025 10:33 pm
by Randy Walker
I have Pb versions 5.40x86, 5.62x64 and 6.20x64 installed here and Its not clear to me which installation is using which or what is possible. This is what I see under [File] > [Preferences...] > [Compiler] for each:
______________________________________________________
Running in PureBasic 5.40 installation:
[File] > [Preferences...] > [Compiler]
Default Compiler

PureBasic 5.40 LTS (Windows - x86)
C:\Program Files (x86)\pureBasic540\Compilers\pbcompiler.exe


Additional Compilers
Path
C:\Program Files\pureBasic620\Compilers\pbcompilerc.exe

______________________________________________________
Running in PureBasic 5.62 installation:
[File] > [Preferences...] > [Compiler]
Default Compiler

PureBasic 5.62(Windows - x64)
C:\Program Files\pureBasic620\Compilers\pbcompiler.exe


Additional Compilers
Path
C:\Program Files\pureBasic620\Compilers\pbcompilerc.exe

______________________________________________________
Running in PureBasic 6.20 installation:
[File] > [Preferences...] > [Compiler]
Default Compiler

PureBasic 6.20 (Windows - x64)
C:\Program Files\pureBasic620\Compilers\pbcompiler.exe


Additional Compilers
Path
C:\Program Files\pureBasic620\Compilers\pbcompilerc.exe

I do see the defaults, but what are those additional compilers doing in there?
And they all end with c.exe instead of just plain .exe
Also curious to note they all point to C:\Program Files\pureBasic620\Compilers\pbcompilerc.exe

Re: Can someone clarify Compilers?

Posted: Fri Jun 06, 2025 10:59 pm
by idle
pb has two compiler backends pbcompiler.exe for asm and pbcompilerc.exe for c
the c backend generates c and uses gcc compiler to compile and can perform more optimizations
the asm backend generates asm and uses fasm to compile

you can choose the compiler to use via Compiler->options->use compiler
you can add compiler versions to that list via file->preferences->Compiler
browse for the PB version you want to add via the ... button then add to the list

Re: Can someone clarify Compilers?

Posted: Sat Jun 07, 2025 3:32 am
by Randy Walker
5.40 and 5.62 both have their own pbcompilerc.exe and yet they both point to the 6.20 pbcompilerc.exe
Seems very strange.