Hi
This maybe a dumb question as I have no experience with C or the GCC compiler in Linux but I was wondering whether the C code produced with the -c option is compilable by GCC? The reason I ask is that PB compiles my code from the IDE using the C Compiler without errors. However if I generate C code using the -c option and use GCC to compile it I get errors.
The back story is that I have a third party Linux web server that compiles Purebasic and C code automatically for use as scripts kind of like ISAPI extensions but for Linux. This third party tool works perfectly with PB 5.73 and compiles the PB code but I have not been able to get it to work with PB 6.20. However since it also handles C code I thought I might use PB 6.20 to generate usable C code instead.
Thanks
Simon
How to generate compilable C code?
How to generate compilable C code?
Simon White
dCipher Computing
dCipher Computing
Re: How to generate compilable C code?
it's a little complicated, the PB generated c code is bound to pure basic libraries it's not independent of it.
So the problem isn't the compilation it's the linking of the libs and that's complicated as PB libs aren't directly useable they need extracting before linking.
So the problem isn't the compilation it's the linking of the libs and that's complicated as PB libs aren't directly useable they need extracting before linking.
Re: How to generate compilable C code?
With the latest PB v6.20, gcc.exe is older.
What is the impediment to maintaining the latest gcc versions?
What is the impediment to maintaining the latest gcc versions?
Code: Select all
c:\PureBasic-x64\Compilers\gcc>gcc --version
gcc (x86_64-win32-seh-rev2, Built by MinGW-W64 project) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: How to generate compilable C code?
Are there some instruction about what is necessary to accomplish the linking?gcc --version
gcc (SUSE Linux) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Simon
Simon White
dCipher Computing
dCipher Computing
Re: How to generate compilable C code?
Same version on windows since v6.03skywalk wrote: Sun Mar 09, 2025 2:25 am With the latest PB v6.20, gcc.exe is older.
What is the impediment to maintaining the latest gcc versions?Code: Select all
c:\PureBasic-x64\Compilers\gcc>gcc --version gcc (x86_64-win32-seh-rev2, Built by MinGW-W64 project) 12.2.0 Copyright (C) 2022 Free Software Foundation, Inc.
On Mint Linux actually same version
gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive

