How to generate compilable C code?
Posted: Sat Mar 08, 2025 2:03 pm
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
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