On 20/apr/2013, at 11:55, Darius Blaszyk <dhkblas...@zeelandnet.nl> wrote:

> Hi,
>
> I'm linking a C and FPC program but I keep on getting undifined symbols (see 
> example below).
>
> Error: Undefined symbol: _strcpy
> Sofar I have added:
>
> {$linklib msvcrt}
> {$linklib gcc}
>
> What other libraries should I add? BTW, I'm compiling the C library with 
> MinGW.

You need to instruct fpc to use gcc instead of default ld when you
link c/pas code statically.
This is because gcc adds many linker flags that are automatically set
when you link something but are not set when you call ld directly.

I think such issue arises only when compiling statically, can you
compile your c library shared?
Cheers,
Vittorio
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to