[Cbc] Compiling on Windows

Lou Hafer lou at cs.sfu.ca
Wed Nov 17 15:33:20 EST 2010


Seth,

On Tue, 2010-11-16 at 10:32 -0500, Wenchel, Seth wrote:
> 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.

	I've been working on the v9alt build for the last while, so take this
with a grain of salt, but my understanding was that the v9 build for Osi
0.104 is entirely broken due to rearrangement of the Osi code tree
between 0.103 and 0.104. We're working on it; if you're interested in
helping, send me an email off-list and I'll add you into that email
conversation. If you're trying to mix and match over the past couple of
stable versions, you're definitely headed for trouble.

	The v9alt build is a completely different philosophy. I need to hunt
around to see where I put the instructions for using it. Again, if
you're interested, send me an email.

> 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 ==========
> 
  The above says that OsiAuxInfo.obj is not being linked into the build,
which implies that it's not being linked into libOsi, which is a bit
baffling because it's in the libOsi.vcproj file for 0.103. No good
explanation off the top of my head.

> 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

	Again, no good explanation, and it's been even longer since I tried a
Cygwin build. I'm going to hope that someone else will field this one.

						Lou



More information about the Cbc mailing list