[Cbc] Compiling on Windows

Wenchel, Seth wenchel at metsci.com
Tue Nov 16 10:32:34 EST 2010


I have a 24-core server on which I'd like to run Cbc 2.6.  It needs to run
windows because of some other projects so I can't change it.

I've tried building Cbc using both the Cbc.sln inside MSVS 2k8 (v9) and
under cygwin using gcc4.  I haven't included any of the 3rd party files.
C/C++ isn't my strong suit so if these errors are really common, I
apologize.  If I can get this figured out I'll happily contribute notes
and/or files back to the project.  As a side note, I've successfully built
Cbc on my Mac using the online instructions.

MSVS
After updating the include directories for the Osi* files, I was able to get
everything to build but had the following linking error.

1>------ Build started: Project: cbcCInterfaceDll, Configuration: Debug
Win32 ------
1>Linking...
1>   Creating library Debug/cbcCInterfaceDll.lib and object
Debug/cbcCInterfaceDll.exp
1>libcgl.lib(OsiSolverInterface.obj) : error LNK2019: unresolved external
symbol "public: __thiscall OsiAuxInfo::OsiAuxInfo(void *)"
(??0OsiAuxInfo@@QAE at PAX@Z) referenced in function "public: void __thiscall
OsiSolverInterface::setApplicationData(void *)"
(?setApplicationData at OsiSolverInterface@@QAEXPAX at Z)
1>libcbc.lib(CbcModel.obj) : error LNK2019: unresolved external symbol
"public: bool __thiscall OsiBabSolver::mipFeasible(void)const "
(?mipFeasible at OsiBabSolver@@QBE_NXZ) referenced in function "public: void
__thiscall CbcModel::branchAndBound(int)"
(?branchAndBound at CbcModel@@QAEXH at Z)
1>libcbc.lib(CbcModel.obj) : error LNK2019: unresolved external symbol
"public: virtual __thiscall OsiBabSolver::~OsiBabSolver(void)"
(??1OsiBabSolver@@UAE at XZ) referenced in function "public: void __thiscall
CbcModel::branchAndBound(int)" (?branchAndBound at CbcModel@@QAEXH at Z)
1>libcbc.lib(CbcModel.obj) : error LNK2019: unresolved external symbol
"public: __thiscall OsiBabSolver::OsiBabSolver(int)"
(??0OsiBabSolver@@QAE at H@Z) referenced in function "public: void __thiscall
CbcModel::branchAndBound(int)" (?branchAndBound at CbcModel@@QAEXH at Z)
1>libcbc.lib(CbcModel.obj) : error LNK2019: unresolved external symbol
"public: int __thiscall OsiBabSolver::solution(double &,double *,int)"
(?solution at OsiBabSolver@@QAEHAANPANH at Z) referenced in function "public:
double __thiscall CbcModel::checkSolution(double,double *,int,double)"
(?checkSolution at CbcModel@@QAENNPANHN at Z)
1>libcbc.lib(CbcHeuristic.obj) : error LNK2001: unresolved external symbol
"public: int __thiscall OsiBabSolver::solution(double &,double *,int)"
(?solution at OsiBabSolver@@QAEHAANPANH at Z)
1>libcbc.lib(CbcModel.obj) : error LNK2019: unresolved external symbol
"public: double __thiscall OsiBabSolver::mipBound(void)const "
(?mipBound at OsiBabSolver@@QBENXZ) referenced in function "public: void
__thiscall CbcModel::setObjectiveValue(class CbcNode *,class CbcNode const
*)const " (?setObjectiveValue at CbcModel@@QBEXPAVCbcNode@@PBV2@@Z)
1>c:\coin-Cbc\coin-Cbc\Cbc\MSVisualStudio\v9\cbcCInterfaceDll\../../cbcCInte
rfacegDll.dll : fatal error LNK1120: 6 unresolved externals
1>Build log was saved at
"file://c:\coin-Cbc\coin-Cbc\Cbc\MSVisualStudio\v9\cbcCInterfaceDll\Debug\Bu
ildLog.htm"
1>cbcCInterfaceDll - 8 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 6 up-to-date, 0 skipped ==========

CYGWIN
./configure ends with the correct message as noted but make fails.  I've
only included the last portion of the output, but send the rest if needed.

/cygdrive/c/Cbc/coin-Cbc/coin-Cbc/Clp/src/.libs/libClp.a(ClpFactorization.o)
:Clp
Factorization.cpp:(.text+0x5b6): undefined reference to
`CoinFactorization::upda
teColumn(CoinIndexedVector*, CoinIndexedVector*, bool) const'
collect2: ld returned 1 exit status
make[3]: *** [cbc.exe] Error 1
make[3]: Leaving directory `/cygdrive/c/Cbc/coin-Cbc/coin-Cbc/Cbc/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/cygdrive/c/Cbc/coin-Cbc/coin-Cbc/Cbc/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/c/Cbc/coin-Cbc/coin-Cbc/Cbc'
make: *** [all-recursive] Error 1

Cheers
seth

Seth S. Wenchel
Metron, Inc.

Sooner or later any problem will get big enough that you can¹t solve it.
But it¹s nicer if you make it later.
    ~A. Rosenberg




More information about the Cbc mailing list