[Clp] Issues with linking library with my project

Stefan Vigerske stefan at math.hu-berlin.de
Thu Mar 20 10:40:11 EDT 2014


Hi,

you seem to list libCoinUtils.so twice.
bz2 and z should come after libCoinUtils.so.
Clp installs an addlibs files in share which lists the linker flags.
Also you could use pkg-config with clp.pc to get the flags.

Stefan

On 03/20/2014 11:59 AM, Sourav Garg wrote:
> Hello,
>
> I have downloaded th CLP tar (Ubuntu 12.04) and gone through steps to
> install the libraries. I tried to run the examples in the example folder
> which works fine.
>
> But when I try to link the library in my project, I get errors. If I link
> only the libclp.so, I get around 250 errors related to CoinUtils. After
> linking the CoinUtils.so, errors reduce to 6:
> .../coin-Clp/lib/libCoinUtils.so:-1: error: undefined reference to `gzwrite'
> .../coin-Clp/lib/libCoinUtils.so:-1: error: undefined reference to `gzopen'
> .../coin-Clp/lib/libCoinUtils.so:-1: error: undefined reference to
> `BZ2_bzWriteClose'
>
> After linking the bz2 library I get rid of last error and their alike, for
> first two errors, I have linked zlib, but the error persists.
>
> I am using QtCreator for my project and linking as follows:
> LINK_DIRECTORIES(mypath/coin-Clp/lib/)
> TARGET_LINK_LIBRARIES(myTarget libClp.so libCoinUtils.so bz2 z libOsi.so
> libCoinUtils.so libOsiClp.so libOsiCommonTests.so)
>
> Please see what I am doing wrong or any other information required to solve
> this issue.
> Thanks in advance,
> Sourav
>
>
>
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp
>



More information about the Clp mailing list