[Cbc] Linking in Linux

Gleb Belov gleb.belov at tu-dresden.de
Wed Feb 20 12:09:59 EST 2008


Dear developers,

I tried to link an example based on sample5.cpp. It cannot find some
functions, see below. Although sample5 links fine. The problem persists
both in static and shared installations of Cbc, with gcc 4.0.1 and
4.1.2. Without the calls to these functions, all is fine.

        g++ -Wl,--rpath
-Wl,/home/nm2/belov/prj/Cbc-2.0.0_gcc412_32_O3/lib -O3
-fomit-frame-pointer -pipe -DNDEBUG -pedantic-errors -Wimplicit
-Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith
-Wwrite-strings -Wconversion -I. -Imystuff -m32 -mtune=opteron -o opp_lp
$bla  -L/home/nm2/belov/prj/Cbc-2.0.0_gcc412_32_O3/lib -lCbc -lCgl
-lOsiClp -lOsiCbc -lOsi -lClp -lCoinUtils -lm `cat
/home/nm2/belov/prj/Cbc-2.0.0_gcc412_32_O3/lib/cgl_addlibs.txt` `cat
/home/nm2/belov/prj/Cbc-2.0.0_gcc412_32_O3/lib/osi_addlibs.txt` `cat
/home/nm2/belov/prj/Cbc-2.0.0_gcc412_32_O3/lib/clp_addlibs.txt` `cat
/home/nm2/belov/prj/Cbc-2.0.0_gcc412_32_O3/lib/coinutils_addlibs.txt`
cbc_iface.o: In function `Solve_P4_KP(double*, double*, double*,
double*, double*, int*, double*, int*, int*, int, int, int, double, char
const*, double*)':
cbc_iface.cpp:(.text+0x140): undefined reference to
`CoinModel::setColumnIsInteger(int, int)'
cbc_iface.cpp:(.text+0x3e2): undefined reference to
`CglClique::CglClique(int, int)'
cbc_iface.cpp:(.text+0x470): undefined reference to
`CbcModel::addCutGenerator(CglCutGenerator*, int, char const*, int, int,
int, int, int, int)'
cbc_iface.cpp:(.text+0x4ca): undefined reference to
`CbcModel::addCutGenerator(CglCutGenerator*, int, char const*, int, int,
int, int, int, int)'
cbc_iface.cpp:(.text+0x524): undefined reference to
`CbcModel::addCutGenerator(CglCutGenerator*, int, char const*, int, int,
int, int, int, int)'
cbc_iface.cpp:(.text+0xefc): undefined reference to
`CoinModel::setColumnIsInteger(int, int)'
collect2: ld gab 1 als Ende-Status zurück





More information about the Cbc mailing list