Re: [fpc-pascal] Link with GCC object files

2018-08-22 Thread Andreas Berger

Thank you Sven, this will be a big help

Regards,
Andreas


On 22/08/2018 12:12, Sven Barth via fpc-pascal wrote:
Andreas > schrieb am Mi., 22. Aug. 2018, 
12:59:


Hi, I have a question. Is it possible to link FPC for Linux (PC
and ARM)
with GCC or other C++ object files?


You can use the $L directive for this ( 
https://freepascal.org/docs-html/current/prog/progsu43.html#x50-490001.2.43 
).
If you use C++ it's recommended to use "extern "C"" however even 
though FPC supports cppdecl (as it can't handle all cases currently). 
And classes won't work either.


Regards,
Sven


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Link with GCC object files

2018-08-22 Thread Sven Barth via fpc-pascal
Andreas  schrieb am Mi., 22. Aug. 2018, 12:59:

> Hi, I have a question. Is it possible to link FPC for Linux (PC and ARM)
> with GCC or other C++ object files?
>

You can use the $L directive for this (
https://freepascal.org/docs-html/current/prog/progsu43.html#x50-490001.2.43
).
If you use C++ it's recommended to use "extern "C"" however even though FPC
supports cppdecl (as it can't handle all cases currently). And classes
won't work either.

Regards,
Sven

>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal