[Clp] Issues with linking library with my project

Miles Lubin miles.lubin at gmail.com
Thu Mar 20 09:07:02 EDT 2014


Hi Sourav,

Shared library dependency linking had been broken for quite a while in Clp
until recently. Try compiling the latest release with the
"--enable-dependency-linking" option. You should then only have to link
with the libraries whose exports you use directly.

Best,
Miles


On Thu, Mar 20, 2014 at 6:59 AM, Sourav Garg <sourav.sahaji at gmail.com>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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20140320/a5e4af05/attachment.html>


More information about the Clp mailing list