[fpc-pascal] Undefined symbols on mac

Darius Blaszyk dhkblaszyk at zeelandnet.nl
Sat Jan 22 12:34:52 CET 2011


Hi Jonas,

You're right, I added the correct library and now it works! Thanks for that.

Regards, Darius


On Jan 22, 2011, at 12:22 PM, Jonas Maebe wrote:

> 
> On 22 Jan 2011, at 11:06, Darius Blaszyk wrote:
> 
>> Compiling my project results in a linker error on Mac. I couldn't find anything on google so perhaps someone can help me here.
>> 
>> I have pasted the error messages below. I'm using : Lazarus 0.9.31 r29068M FPC 2.4.2 i386-darwin-carbon
>> 
>> Undefined symbols:
>> "_iconv_open", referenced from:
> 
> My guess is that you are not linking against the system version of libiconv, but against a version of that library compiled by a third party (fink, macports, ...). That is not supported by the cwstring unit (and it's a good thing that gives an error at link time, since the program would otherwise fail to start on machines that do not have that custom version of libiconv installed).
> 
> I think you should be able to force the linker to pick the system version by passing -k/usr/lib/libiconv.dylib on the command line. Alternatively, remove the fink/macports/... directory from your linker search path (in case you don't use any of its libraries).
> 
> 
> Jonas_______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal




More information about the fpc-pascal mailing list