hi,<div><br></div><div>I've been struggling with trying to get Symphony's OSI extension to work when compiling a C++ program. I've tried the sample code milpOsi.c (after renaming to *.cpp) with the same error: "obj\Release\test script.o:test script.cpp:(.text.startup+0x8e)||undefined reference to `OsiSymSolverInterface::OsiSymSolverInterface()'|"</div>
<div><br></div><div><br></div><div>in other attempts (e.g. instantiating a pointer to OsiSymSolverInterface), i would get the same error for the next function i tried. i know it's a linker error, but i can't figure out what library it's looking for so i can make sure it's being linked properly.</div>
<div><br></div><div>there is a bit of backstory but hopefully i can avoid getting into it. i'm using MinGW_w64's g++.exe (yes, tried it with standard MinGW g++) via Code::Blocks IDE, and i've instructed it to look in \SYMPHONY-5.4.4\lib for the libraries and have tried explicitly specifying to link to these libraries: libCgl.a libClp.a libCoinUtils.a libOsi.a libOsiClp.a libOsiCommonTests.a libOsiSym.a libSym.a (these are the only *.a files present in the lib directory). I'm also using glpk for GMPL support by the way. here's the command line invocation that Code::Blocks is issuing to the compiler:</div>
<div><br></div><div><div>g++.exe -Wall -fexceptions -O2 -O2 -Weffc++ -IC:\Apps\Programming\SYMPHONY-5.4.4\SYMPHONY\include -IC:\Apps\Programming\MinGW_w64\include -IC:\Apps\Programming\SYMPHONY-5.4.4\include\coin -IC:\Apps\Programming\SYMPHONY-5.4.4\ThirdParty\Glpk\glpk\include -c C:\Apps\Programming\SYMPHONY-5.4.4\SYMPHONY\Examples\test\milpOsi.cpp -o obj\Release\milpOsi.o</div>
<div>In file included from C:\Apps\Programming\SYMPHONY-5.4.4\include\coin/OsiSymSolverInterface.hpp:24:0,</div><div> from C:\Apps\Programming\SYMPHONY-5.4.4\SYMPHONY\Examples\test\milpOsi.cpp:17:</div><div>
C:\Apps\Programming\SYMPHONY-5.4.4\include\coin/SymWarmStart.hpp:28:7: warning: 'class SymWarmStart' has pointer data members [-Weffc++]</div><div>C:\Apps\Programming\SYMPHONY-5.4.4\include\coin/SymWarmStart.hpp:28:7: warning: but does not override 'operator=(const SymWarmStart&)' [-Weffc++]</div>
<div>C:\Apps\Programming\SYMPHONY-5.4.4\include\coin/SymWarmStart.hpp: In constructor 'SymWarmStart::SymWarmStart()':</div><div>C:\Apps\Programming\SYMPHONY-5.4.4\include\coin/SymWarmStart.hpp:34:4: warning: 'SymWarmStart::warmStart_' should be initialized in the member initialization list [-Weffc++]</div>
<div>g++.exe -LC:\Apps\Programming\SYMPHONY-5.4.4\lib -LC:\Apps\Programming\MinGW_w64\lib -LC:\Apps\Programming\SYMPHONY-5.4.4\lib -o bin\Release\test.exe obj\Release\milpOsi.o -s </div><div>obj\Release\milpOsi.o:milpOsi.cpp:(.text.startup+0x6d): undefined reference to `OsiSymSolverInterface::OsiSymSolverInterface()'</div>
<div>obj\Release\milpOsi.o:milpOsi.cpp:(.text.startup+0x91): undefined reference to `OsiSymSolverInterface::parseCommandLine(int, char**)'</div><div>obj\Release\milpOsi.o:milpOsi.cpp:(.text.startup+0x9e): undefined reference to `OsiSymSolverInterface::loadProblem()'</div>
<div>obj\Release\milpOsi.o:milpOsi.cpp:(.text.startup+0xab): undefined reference to `OsiSymSolverInterface::branchAndBound()'</div><div>obj\Release\milpOsi.o:milpOsi.cpp:(.text.startup+0xc0): undefined reference to `OsiSymSolverInterface::~OsiSymSolverInterface()'</div>
<div>obj\Release\milpOsi.o:milpOsi.cpp:(.text.startup+0xf7): undefined reference to `OsiSymSolverInterface::~OsiSymSolverInterface()'</div><div>collect2: ld returned 1 exit status</div><div>Process terminated with status 1 (0 minutes, 1 seconds)</div>
<div>6 errors, 3 warnings</div></div><div><br></div><div><br></div><div>i've tried to get this working for a day now, otherwise i wouldn't have bothered anyone. apologies if this is a repost problem and thanks in advance to any who can help. :)</div>
<div><br></div><div><br></div><div>-- erik</div><div><br></div>