<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
It links now! But:<br>
<br>
bg@bg-vbox:/media/sf_SHARED/prj/libmzn/build$ mzn-cbc <br>
mzn-cbc: error while loading shared libraries: libCgl.so.0: cannot
open shared object file: No such file or directory<br>
<br>
I compiled cbc as follows:<br>
./configure -C --disable-shared --enable-static && make -j 2
&& make install<br>
<br>
Gleb<br>
<br>
<div class="moz-cite-prefix">On 22/02/2016 12:01 PM, Ted Ralphs
wrote:<br>
</div>
<blockquote
cite="mid:CA+GYycsQrx1RBduWS3-+Bh8HkfWz3mSrSEDQika=1nSKLUr_YA@mail.gmail.com"
type="cite">
<div dir="ltr">I'm pretty sure this is a link order problem. If
you modify the link order to
<div><br>
</div>
<div><span style="font-size:12.8px">-lCbcSolver -lCbc -lCgl
-lOsiClp -lClpSolver -lClp -lOsi -lCoinUtils</span><br>
</div>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">I'm guessing the problem
will go away. I had forgotten that I guess this was only a
problem with static libraries.</span></div>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">Ted</span></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Feb 21, 2016 at 7:07 PM, Gleb
Belov <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:gleb.belov@monash.edu" target="_blank">gleb.belov@monash.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hi Ted,<br>
<br>
the linker does not really find any functions in the
libraries, although it finds all the .a files. The
relevant part of cmake's output is attached. Here are the
contents of CBC's lib directory:<br>
<br>
bg@bg-vbox:/media/sf_SHARED/prj/libmzn/build$ ls
$OSICBC_HOME/lib<br>
libCbc.a libCbcSolver.a libCgl.a libClp.a
libClpSolver.a libCoinUtils.a libOsi.a
libOsiCbc.la libOsiClp.la libOsiCommonTests.la
pkgconfig<br>
libCbc.la libCbcSolver.la libCgl.la libClp.la
libClpSolver.la libCoinUtils.la libOsiCbc.a
libOsiClp.a libOsiCommonTests.a libOsi.la<br>
<br>
Looking for one of the functions missed, writeMpsNative,
gives:<br>
<br>
bg@bg-vbox:/media/sf_SHARED/prj/libmzn/build$ grep
writeMpsNative $OSICBC_HOME/lib/*<br>
Binary file
/home/bg/Documents/prj/coin-Cbc-2.9/lib/libCbc.a matches<br>
Binary file
/home/bg/Documents/prj/coin-Cbc-2.9/lib/libCbcSolver.a
matches<br>
Binary file
/home/bg/Documents/prj/coin-Cbc-2.9/lib/libOsi.a matches<br>
Binary file
/home/bg/Documents/prj/coin-Cbc-2.9/lib/libOsiCbc.a
matches<br>
Binary file
/home/bg/Documents/prj/coin-Cbc-2.9/lib/libOsiClp.a
matches<br>
Binary file
/home/bg/Documents/prj/coin-Cbc-2.9/lib/libOsiCommonTests.a
matches<br>
grep: /home/bg/Documents/prj/coin-Cbc-2.9/lib/pkgconfig:
Is a directory<br>
<br>
<br>
Gleb<br>
<br>
<div>On 22/02/2016 10:36 AM, Ted Ralphs wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">As far as I know, there shouldn't be
anything special you need to do in order to link to
static libraries in Linux. What's the error? On
Windows, we only support generation of static
libraries at this point, so nothing should be any
different there.
<div><br>
</div>
<div>Ted</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Feb 21, 2016 at 6:02
PM, Gleb Belov <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:gleb.belov@monash.edu"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:gleb.belov@monash.edu">gleb.belov@monash.edu</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Now it
works with 2268 without any further changes,
thank you.<br>
<br>
Next question: when configuring with
--enable-static --disable-shared, the /lib
forlder has only .a (and probably .la) files and
the examples' Makefile is not much different.
However my executable does not link. Is there
any specific link flag in this case? What is
under Win?<span></span><br>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">Dr. Ted Ralphs<br>
Professor, Lehigh University<br>
(610) 628-1280<br>
ted 'at' lehigh 'dot' edu<br>
<a moz-do-not-send="true"
href="http://coral.ie.lehigh.edu/%7Eted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>