[Coin-discuss] Problem Compiling Coin with Visual C++ 2005 Express Edition

Jan-Willem.Goossens at nc3a.nato.int Jan-Willem.Goossens at nc3a.nato.int
Tue Mar 28 12:01:30 EST 2006


Hi,

Unfortunately, I can confirm this....
This all starts at  OsiCuts.hpp line 363:

return *(std::min_element(b,e,OsiCutCompare()));

I'm not sure what happens, but the new microsoft STL doesnt like it, if
I understand it correctly. Anybody know how do change the call? Or is
the alternative to do it similarly to a few lines below, by simply
iterating over the elements. 
For testing, I just changed this to "return NULL;"...

Another problem is in CoinLPIo.cpp:  

strncasecmp  

is not something MSs <string> knows about. They call it 

_strnicmp

And another is:
c:\temp\coin\coin\clp\test\clpmain.cpp(831) : error C2440:
'initializing' : cannot convert from 'const char *' to 'char *'
        Conversion loses qualifiers

And yet another is:
cbclib.lib(CbcModel.obj) : error LNK2019: unresolved external symbol
"public: __thiscall CbcEventHandler::CbcEventHandler(class CbcModel
const *)" (??0CbcEventHandler@@QAE at PBVCbcModel@@@Z) referenced in
function "public: __thiscall CbcModel::CbcModel(void)"
(??0CbcModel@@QAE at XZ)
cbclib.lib(CbcModel.obj) : error LNK2019: unresolved external symbol
"public: __thiscall CbcEventHandler::CbcEventHandler(class
CbcEventHandler const &)" (??0CbcEventHandler@@QAE at ABV0@@Z) referenced
in function "public: __thiscall CbcModel::CbcModel(class CbcModel const
&,bool)" (??0CbcModel@@QAE at ABV0@_N at Z)
.\Debug/CbcSamplesSudoku.exe : fatal error LNK1120: 2 unresolved
externals

(not sure about this one, note that I didn't start the VS via the *.bat
file)

Since I don't have many of the solvers like cplex etc, I cant really do
a full test. 
Also, I don't know about OsiDylp, since, apparently, that Win project
was 'corrupted' when I tried loading it.

There are also a lot of new warnings about stuff being Deprecated. 

You can check out the full log at
http://jgoossens.t75.nl/files/vs2005-coin.log

Regards,

Jan-Willem













-----Original Message-----
From: coin-discuss-bounces at list.coin-or.org
[mailto:coin-discuss-bounces at list.coin-or.org] On Behalf Of Luca.caponio
Sent: 28 March 2006 14:50
To: coin-discuss at list.coin-or.org
Subject: [Coin-discuss] Problem Compiling Coin with Visual C++ 2005
Express Edition


Dear all,
I'm trying to compile the COIN project under Visual C++ 2005 Express
Edition, but the compiler gives this error:


---- COMPILER OUTPUT START---
d:\program files\microsoft visual studio 8\vc\include\xutility(572) :
error C2039: 'iterator_category' : is not a member of
'OsiCuts::const_iterator'
        e:\coin\osi\include\osicuts.hpp(75) : see declaration of
'OsiCuts::const_iterator'
        d:\program files\microsoft visual studio
8\vc\include\xutility(1368) : see reference to class template
instantiation 'std::iterator_traits<_Iter>' being compiled
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
        d:\program files\microsoft visual studio
8\vc\include\algorithm(3819) : see reference to function template
instantiation 'void std::_Debug_range<_FwdIt>(_InIt,_InIt,const wchar_t
*,unsigned int)' being compiled
        with
        [
            _FwdIt=OsiCuts::const_iterator,
            _InIt=OsiCuts::const_iterator
        ]
        d:\program files\microsoft visual studio
8\vc\include\algorithm(3833) : see reference to function template
instantiation '_FwdIt
std::_Min_element<OsiCuts::const_iterator,_Pr>(_FwdIt,_FwdIt,_Pr)' being
compiled
        with
        [
            _FwdIt=OsiCuts::const_iterator,
            _Pr=OsiCuts::OsiCutCompare
        ]
        e:\coin\osi\include\osicuts.hpp(363) : see reference to function
template instantiation '_FwdIt
std::min_element<OsiCuts::const_iterator,OsiCuts::OsiCutCompare>(_FwdIt,
_FwdIt,_Pr)' being compiled
        with
        [
            _FwdIt=OsiCuts::const_iterator,
            _Pr=OsiCuts::OsiCutCompare
        ]
d:\program files\microsoft visual studio 8\vc\include\xutility(572) :
error C2146: syntax error : missing ';' before identifier
'iterator_category'
d:\program files\microsoft visual studio 8\vc\include\xutility(57 2) :
error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
d:\program files\microsoft visual studio 8\vc\include\xutility(572) :
error C2602: 'std::iterator_traits<_Iter>::iterator_category' is not a
member of a base class of 'std::iterator_traits<_Iter>'
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
        d:\program files\microsoft visual studio
8\vc\include\xutility(572) : see declaration of
'std::iterator_traits<_Iter>::iterator_category'
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
d:\program files\microsoft visual studio 8\vc\include\xutility(572) :
error C2868: 'std::iterator_traits<_Iter>::iterator_category' : illegal
syntax for using-declaration; expected qualified-name
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
d:\program files\microsoft visual studio 8\vc\include\xutility(573) :
error C2039: 'value_type' : is not a member of 'OsiCuts::const_iterator'
        e:\coin\osi\include\osicuts.hpp(75) : see declaration of
'OsiCuts::const_iterator'
d:\program files\microsoft visual studio 8\vc\include\xutility(573) :
error C2146: syntax error : missing ';' before identifier 'value_type'
d:\program files\microsoft visual studio 8\vc\include\xutility(573) :
error C4430: missing type specifier - int as sumed. Note: C++ does not
support default-int
d:\program files\microsoft visual studio 8\vc\include\xutility(573) :
error C2602: 'std::iterator_traits<_Iter>::value_type' is not a member
of a base class of 'std::iterator_traits<_Iter>'
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
        d:\program files\microsoft visual studio
8\vc\include\xutility(573) : see declaration of
'std::iterator_traits<_Iter>::value_type'
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
d:\program files\microsoft visual studio 8\vc\include\xutility(573 ) :
error C2868: 'std::iterator_traits<_Iter>::value_type' : illegal syntax
for using-declaration; expected qualified-name
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
d:\program files\microsoft visual studio 8\vc\include\xutility(574) :
error C2039: 'difference_type' : is not a member of
'OsiCuts::const_iterator'
        e:\coin\osi\include\osicuts.hpp(75) : see declaration of
'OsiCuts::const_iterator'
d:\program files\microsoft visual studio 8\vc\include\xutility(574) :
error C2146: syntax error : missing ';' before identifier
'difference_type'
d:\program files\microsoft visual studio 8\vc\include\xutility(574) :
error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
d:\program files\micros oft visual studio 8\vc\include\xutility(574) :
error C2602: 'std::iterator_traits<_Iter>::difference_type' is not a
member of a base class of 'std::iterator_traits<_Iter>'
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
        d:\program files\microsoft visual studio
8\vc\include\xutility(574) : see declaration of
'std::iterator_traits<_Iter>::difference_type'
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
d:\program files\microsoft visual studio 8\vc\include\xutility(574) :
error C2868: 'std::iterator_traits<_Iter>::difference_type' : illegal
syntax for using-declaration; expected qualified-name
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
d:\program files\microsoft visual studio 8\vc\include\xutility(576) :
error C2039: 'pointer' : is not a member of 'OsiCuts::const_iterator'
        e:\coin\osi\include\osicuts.hpp(75) : see declaration of
'OsiCuts::const_iterator'
d:\program files\microsoft visual studio 8\vc\include\xutility(576) :
error C2146: syntax error : missing ';' before identifier 'pointer'
d:\program files\microsoft visual studio 8\vc\include\xutility(576) :
error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
d:\program files\microsoft visual studio 8\vc\include\xutility(576) :
error C2602: 'std::iterator_traits<_Iter>::pointer' is not a member of a
base class of 'std::iterator_traits<_Iter>'
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
        d:\program files\microsoft visual studio
8\vc\include\xutility(576) : see declaration of
'std::iterator_traits<_Iter>::pointer'
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
d:\program files\microsoft visual studio 8\vc\include\xutility(576) :
error C2868: 'std::iterator_traits<_Iter>::pointer' : illegal syntax for
using-declaration; expected qualified-name
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
d:\program files\microsoft visual studio 8\vc\include\xutility(577) :
error C2039: 'reference' : is not a member of 'OsiCuts::const_iterator'
        e:\coin\osi\include\osicuts.hpp(75) : see declaration of
'OsiCuts::const_iterator'
d:\program files\microsoft visual studio 8\vc\include\xutility(577) :
error C2146: syntax error : missing ';' before identifier 'reference'
d:\program files\microsoft visual studio 8\vc\include\xutility(577) :
error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
d:\program files\microsoft visual studio 8\vc\include\xutility(577) :
error C2602: 'std::iterator_traits<_Iter>::reference' is not a member of
a base class of 'std::iterator_traits<_Iter>'
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
        d:\program files\microsoft visual studio
8\vc\include\xutility(577) : see declaration of
'std::iterator_traits<_Iter>::reference'
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
d:\program files\microsoft visual studio 8\vc\include\xutility(577) :
error C2868: 'std::iterator_traits<_Iter>::reference' : illegal syntax
for using-declaration; expected qualified-name
        with
        [
            _Iter=OsiCuts::const_iterator
        ]
d:\program files\microsoft visual studio 8\vc\include\xutility(1368) :
error C2665: 'std::_Debug_range2' : none of the 2 overloads could
convert all the argument types
        d:\program files\microsoft visual studio
8\vc\include\xutility(1347): could be 'void
std::_Debug_range2<_InIt>(_InIt,_InIt,const wchar_t *,unsigned
int,std::input_iterator_tag)'
        with
        [
            _InIt=OsiCuts::const_iterator
        ]
        d:\program files\microsoft visual studio
8\vc\include\xutility(1353): or 'void
std::_Debug_range2<_InIt>(_RanIt,_RanIt,const wchar_t *,unsigned
int,std::random_access_iterator_tag)'
        with
        [
            _InIt=OsiCuts::const_iterator,
            _RanIt=OsiCuts::const_iterator
        ]
        while trying to match the argument list
'(OsiCuts::const_iterator, OsiCuts::const_iterator, const wchar_t *,
unsigned int, int)'

---- COMPILER OUTPUT END---

the log reported refers to Cbc_C_Interface.cpp, but many other .cpp
files have the same problem.

Did anyone already found this?
Thank you very much,

Luca Caponio


----
Email.it, the professional e-mail, gratis per te: clicca qui 

Sponsor:
Sei in cerca dell'amore? Non perdere tempo, iscriviti gratis a Meetic!
Potrai chattare con migliaia di single in linea.
Clicca qui 




More information about the Coin-discuss mailing list