c++ - Specifying correct library to link in Xcode when multiple copies exist on search path -


i trying compile c++ file depends on ffmpeg. have spent long time trying fix link errors. found on mac needs:

libbz2.dylib libiconv.dylib libz.dylib libavcodec.a libavformat.a libswscale.a libswresample.a videodecodeacceleration.framework codevideo.framework corefoundation.framework 

the problem have still symbol link errors libiconv though library present in /usr/lib , other libraries in directory being found there. compile line includes -liconv.2

on searching around found problem comes there being 2 version of libiconv on system. 1 in /usr/lib , other in /opt/local/lib. 1 in /usr/lib exports symbols ffmpeg uses named "_iconv_open", whereas 1 in /opt/local/lib exports same symbols "lib" added, e.g. "_libiconv_open". seems compiler picking /opt/local/lib library.

how can xcode pick correct lib?


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -