<div dir="ltr">Just to follow up on the list and bring this to a resolution, deleting some stray .so files did fix the problem.<div><br></div><div>Cheers,</div><div><br></div><div>Ted</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 22, 2016 at 5:43 AM, Stefan Vigerske <span dir="ltr"><<a href="mailto:stefan@math.hu-berlin.de" target="_blank">stefan@math.hu-berlin.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
delete the .so files from $OSICBC_HOME/lib before you link your executable, or link with -static.<br>
<br>
Stefan<span class=""><br>
<br>
On 02/22/2016 03:36 AM, Gleb Belov wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
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<br>
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<br>
install<br>
<br>
Gleb<br>
<br>
On 22/02/2016 12:01 PM, Ted Ralphs wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
I'm pretty sure this is a link order problem. If you modify the link<br>
order to<br>
<br>
-lCbcSolver -lCbc -lCgl -lOsiClp -lClpSolver -lClp -lOsi -lCoinUtils<br>
<br>
I'm guessing the problem will go away. I had forgotten that I guess<br>
this was only a problem with static libraries.<br>
<br>
Ted<br>
<br>
On Sun, Feb 21, 2016 at 7:07 PM, Gleb Belov <<a href="mailto:gleb.belov@monash.edu" target="_blank">gleb.belov@monash.edu</a><br></span><div><div class="h5">
<mailto:<a href="mailto:gleb.belov@monash.edu" target="_blank">gleb.belov@monash.edu</a>>> wrote:<br>
<br>
    Hi Ted,<br>
<br>
    the linker does not really find any functions in the libraries,<br>
    although it finds all the .a files. The relevant part of cmake's<br>
    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<br>
libCoinUtils.a   libOsi.a libOsiCbc.la  libOsiClp.la<br>
libOsiCommonTests.la pkgconfig<br>
    libCbc.la  libCbcSolver.la  libCgl.la  libClp.la libClpSolver.la<br>
    libCoinUtils.la  libOsiCbc.a libOsiClp.a   libOsiCommonTests.a<br>
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<br>
    $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<br>
    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<br>
    matches<br>
    Binary file /home/bg/Documents/prj/coin-Cbc-2.9/lib/libOsiClp.a<br>
    matches<br>
    Binary file<br>
    /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<br>
    directory<br>
<br>
<br>
    Gleb<br>
<br>
    On 22/02/2016 10:36 AM, Ted Ralphs wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
    As far as I know, there shouldn't be anything special you need to<br>
    do in order to link to static libraries in Linux. What's the<br>
    error? On Windows, we only support generation of static libraries<br>
    at this point, so nothing should be any different there.<br>
<br>
    Ted<br>
<br>
    On Sun, Feb 21, 2016 at 6:02 PM, Gleb Belov<br></div></div><span class="">
    <<a href="mailto:gleb.belov@monash.edu" target="_blank">gleb.belov@monash.edu</a> <mailto:<a href="mailto:gleb.belov@monash.edu" target="_blank">gleb.belov@monash.edu</a>>> wrote:<br>
<br>
        Now it works with 2268 without any further changes, thank you.<br>
<br>
        Next question: when configuring with --enable-static<br>
        --disable-shared, the /lib forlder has only .a (and probably<br>
        .la) files and the examples' Makefile is not much different.<br>
        However my executable does not link. Is there any specific<br>
        link flag in this case? What is under Win?<br>
<br>
</span></blockquote><span class="">
<br>
<br>
<br>
<br>
--<br>
Dr. Ted Ralphs<br>
Professor, Lehigh University<br>
<a href="tel:%28610%29%20628-1280" value="+16106281280" target="_blank">(610) 628-1280</a><br>
ted 'at' lehigh 'dot' edu<br>
</span><a href="http://coral.ie.lehigh.edu/~ted" rel="noreferrer" target="_blank">coral.ie.lehigh.edu/~ted</a> <<a href="http://coral.ie.lehigh.edu/%7Eted" rel="noreferrer" target="_blank">http://coral.ie.lehigh.edu/%7Eted</a>><br>
</blockquote>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org" target="_blank">Cbc@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/cbc" rel="noreferrer" target="_blank">http://list.coin-or.org/mailman/listinfo/cbc</a><br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
-- <br>
<a href="http://www.gams.com/~stefan" rel="noreferrer" target="_blank">http://www.gams.com/~stefan</a><br>
</font></span></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 href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br></div></div>
</div>