[Osi] uflOSI in MSVS 8 or 9

Matthew Saltzman mjs at clemson.edu
Thu Aug 13 15:58:55 EDT 2009


On Tue, 2009-08-11 at 21:29 -0500, dana at housedonors.com wrote: 
> Greetings,
> 
> I am new to COIN-OR and am trying to build the uflOSI example from Ted  
> Ralphs, Matthew Saltzman, and Matthew Galati.  Unfortunately it looks  
> like the example was last built with MSVS 6 - when I try to open I am  
> prompted to convert the project and then told the file is corrupt.  I  
> tried to manually build the project but ran into a series of problems.  
>   The first, missing Cgl files, was easily remedied by adding the  
> files.  The second, a series of unresolved external symbols, I could  
> not figure out.  I have included the exact error at the bottom of the  
> message.  Can someone offer me advice on how to fix this or find a  
> more recent version of the uflOSI example?

The messages you see are from the link step of the compilation.  Once
you have the appropriate include files, each source file can be compiled
into an object file.  After all source files are compiled, the object
files must be linked together to form the final executable.  Part of
that step involves linking to libraries of object files corresponding to
the functions that your header included.  The errors you see are from
the attempt to find the object code associated with the particular
function names that are cited. The problem is, the library of object
files associated with CGL are not being found by your compiler.

What you need to do is, first, build the CGL library, and second, make
sure the library is available to MSVS during the build of the uflOSI
executable.

Unfortunately, I don't have experience building this in MSVS.  But if
you find out about building with libraries in MSVS, I think it should be
straightforward.  Post again if you still have problems.  Somebody
should be able to help.

> 
> Thank you,
> Dana
> 
> 
> 
> 
> 
> 
> 
> ufl.obj : error LNK2019: unresolved external symbol "public:  
> __thiscall CglProbing::CglProbing(void)" (??0CglProbing@@QAE at XZ)  
> referenced in function "private: int __thiscall  
> UFL::generate_cuts_CGL(class std::basic_ostream<char,struct  
> std::char_traits<char> > *)"  
> (?generate_cuts_CGL at UFL@@AAEHPAV?$basic_ostream at DU?$char_traits at D@std@@@std@@@Z)
> ufl.obj : error LNK2019: unresolved external symbol "public:  
> __thiscall CglOddHole::CglOddHole(void)" (??0CglOddHole@@QAE at XZ)  
> referenced in function "private: int __thiscall  
> UFL::generate_cuts_CGL(class std::basic_ostream<char,struct  
> std::char_traits<char> > *)"  
> (?generate_cuts_CGL at UFL@@AAEHPAV?$basic_ostream at DU?$char_traits at D@std@@@std@@@Z)
> ufl.obj : error LNK2019: unresolved external symbol "public:  
> __thiscall CglSimpleRounding::CglSimpleRounding(void)"  
> (??0CglSimpleRounding@@QAE at XZ) referenced in function "private: int  
> __thiscall UFL::generate_cuts_CGL(class std::basic_ostream<char,struct  
> std::char_traits<char> > *)"  
> (?generate_cuts_CGL at UFL@@AAEHPAV?$basic_ostream at DU?$char_traits at D@std@@@std@@@Z)
> ufl.obj : error LNK2019: unresolved external symbol "public:  
> __thiscall CglKnapsackCover::CglKnapsackCover(void)"  
> (??0CglKnapsackCover@@QAE at XZ) referenced in function "private: int  
> __thiscall UFL::generate_cuts_CGL(class std::basic_ostream<char,struct  
> std::char_traits<char> > *)"  
> (?generate_cuts_CGL at UFL@@AAEHPAV?$basic_ostream at DU?$char_traits at D@std@@@std@@@Z)
> ufl.obj : error LNK2019: unresolved external symbol "public:  
> __thiscall CglTreeInfo::CglTreeInfo(void)" (??0CglTreeInfo@@QAE at XZ)  
> referenced in function "private: int __thiscall  
> UFL::generate_cuts_CGL(class std::basic_ostream<char,struct  
> std::char_traits<char> > *)"  
> (?generate_cuts_CGL at UFL@@AAEHPAV?$basic_ostream at DU?$char_traits at D@std@@@std@@@Z)
> ufl.obj : error LNK2019: unresolved external symbol "public: void  
> __thiscall CglGomory::setLimit(int)" (?setLimit at CglGomory@@QAEXH at Z)  
> referenced in function "private: int __thiscall  
> UFL::generate_cuts_CGL(class std::basic_ostream<char,struct  
> std::char_traits<char> > *)"  
> (?generate_cuts_CGL at UFL@@AAEHPAV?$basic_ostream at DU?$char_traits at D@std@@@std@@@Z)
> ufl.obj : error LNK2019: unresolved external symbol "public:  
> __thiscall CglGomory::CglGomory(void)" (??0CglGomory@@QAE at XZ)  
> referenced in function "private: int __thiscall  
> UFL::generate_cuts_CGL(class std::basic_ostream<char,struct  
> std::char_traits<char> > *)"  
> (?generate_cuts_CGL at UFL@@AAEHPAV?$basic_ostream at DU?$char_traits at D@std@@@std@@@Z)
> Release/OsiExamplesBasic.exe : fatal error LNK1120: 7 unresolved externals
> 
> 
> _______________________________________________
> Osi mailing list
> Osi at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/osi
-- 
                Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs




More information about the Osi mailing list