[fpc-devel] C++ Linking technology

peter green plugwash at p10link.net
Fri Apr 27 22:41:20 CEST 2007


> They don't have to: the compilers/interpreters for these languages are 
> written in C. All they need to do in the worst case is compile a small 
> stub. For Pascal, the situation is not so simple, as there is no 
> connection
> with C whatsoever.
well there is nothing to stop you writing stubs in C/C++ to use with your pascal application, i don't see how thats any harder than writing a C++ stub to call from a plain C interpreter.

C++ on linux is a bit of a nightmare though with libstdc++ changing ABI all the time and apps linked against multiple versions of libstdc++ tending to crash so C++ code in your app may be something you want to avoid. 

you could possiblly ship the c++ as source and the pascal as .o files avoiding the need for fpc on the users machine while avoiding the libstdc++ versioning issues.



 




More information about the fpc-devel mailing list