OK.
I suggest that the Pure team should add the gcc C++ Compiler so that c== can be supported in our apps.
The C code could be compiled to an object file by GCC and the Linker would put together the C++ code object and the objects created for our programs resulting in the program being able to use c routines
C++ code compilation supportion
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
This can be done using a precompiler.
- mark a codepart as a "C" or "C++" part using EnableCPP and DisableCPP like known from EnableASM and DisableASM.
The parser copies that part to a blank.cpp file and sends it to GCC,
finally the rest will be compield by PB itself and finally a polink comment should give the needed argument for linking with the pre compiled object.
But ... like Trond suggested, compiled lib's and obj's can be simply 'Import'ed by PB natively ... and I always would use a C++ IDE for developing C++ code parts (not mention indentation, highlightning, etc etc etc).
- mark a codepart as a "C" or "C++" part using EnableCPP and DisableCPP like known from EnableASM and DisableASM.
The parser copies that part to a blank.cpp file and sends it to GCC,
finally the rest will be compield by PB itself and finally a polink comment should give the needed argument for linking with the pre compiled object.
But ... like Trond suggested, compiled lib's and obj's can be simply 'Import'ed by PB natively ... and I always would use a C++ IDE for developing C++ code parts (not mention indentation, highlightning, etc etc etc).
Check out OOP support for PB here!