[Clp] Issues with linking library with my project

Sourav Garg sourav.sahaji at gmail.com
Thu Mar 20 06:59:53 EDT 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20140320/095c5017/attachment.html>


More information about the Clp mailing list