[Osi] uflOSI in MSVS 8 or 9

Ted Ralphs ted at lehigh.edu
Thu Aug 13 16:43:10 EDT 2009


Sorry, the UflOsi example has not been updated in a while. There are a
number of possible reasons for this linking error. If you have
included all the relevant project files in your solution, then you may
not have set the project dependencies properly to allow them to be
linked to each other. The project dependencies set the build order.
Dependent libraries must be built first.  Even if you have built all
the libraries in the right order, these link errors could also be
caused by using mis-matched run-time libraries. Make sure that the
setting in the Properties->Configuration Properties->C/C++->Code
Generation->Runtime Library for the oflOsi project is set to the same
as all the other COIN projects, which should already match. If you try
all this, you should get it up and running.

Cheers,

Ted

On Thu, Aug 13, 2009 at 3:58 PM, Matthew Saltzman<mjs at clemson.edu> wrote:
> 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
>
> _______________________________________________
> Osi mailing list
> Osi at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/osi
>



-- 
Dr. Ted Ralphs
Associate Professor, Lehigh University
(610) 628-1280
ted 'at' lehigh 'dot' edu
coral.ie.lehigh.edu/~ted





More information about the Osi mailing list