Skip to main content
GameDev.net gamedev.net
🔒 Locked

Possible bug with VS2005 and STL or MySQL 5.0?

Started by mopos May 22, 2006 at 6:01 PM 2 replies 3.1k views
Original Post
mopos
mopos
Hi, So I've run in to this very weird problem when i try to compile my solution using VS2005 C++. I've been using my_global.h and mysql.h throughout the project when necessary but suddenly when i try to include it from SqlDataReader.h file i get a ton of compile errors. I've tried to compile the same code on freebsd using g++ and that worked out fine. I've also tried on windows with mysql 4.1 headerfiles and client... same result didn't work. Error 1 error C2766: explicit specialization; 'std::iterator_traits' has already been defined c:\program files\microsoft visual studio 8\vc\include\xutility 682 Error 2 error C2766: explicit specialization; 'std::_Ptr_cat_helper' has already been defined c:\program files\microsoft visual studio 8\vc\include\xutility 1156 Error 3 error C2766: explicit specialization; 'std::_Ptr_cat_helper' has already been defined c:\program files\microsoft visual studio 8\vc\include\xutility 1162 Error 4 error C2535: 'std::basic_ostream<_Elem,_Traits> &std::basic_ostream<_Elem,_Traits>::operator <<(std::_Bool)' : member function already defined or declared c:\program files\microsoft visual studio 8\vc\include\ostream 262 Error 5 error C2535: 'std::basic_ostream<_Elem,_Traits> &std::basic_ostream<_Elem,_Traits>::operator <<(std::_Bool)' : member function already defined or declared c:\program files\microsoft visual studio 8\vc\include\ostream 262 Error 6 error C2535: 'std::basic_ostream<_Elem,_Traits> &std::basic_ostream<_Elem,_Traits>::operator <<(std::_Bool)' : member function already defined or declared c:\program files\microsoft visual studio 8\vc\include\ostream 262 Error 7 error C2535: 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::_Bool &)' : member function already defined or declared c:\program files\microsoft visual studio 8\vc\include\istream 248 Error 8 error C2535: 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::_Bool &)' : member function already defined or declared c:\program files\microsoft visual studio 8\vc\include\istream 248 Error 9 error C2535: 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::_Bool &)' : member function already defined or declared c:\program files\microsoft visual studio 8\vc\include\istream 248 ------ Build started: Project: dbframework, Configuration: Debug Win32 ------ Compiling... SqlDataReader.cpp c:\program files\microsoft visual studio 8\vc\include\xutility(682) : error C2766: explicit specialization; 'std::iterator_traits' has already been defined c:\program files\microsoft visual studio 8\vc\include\xutility(610) : see previous definition of 'iterator_traits' c:\program files\microsoft visual studio 8\vc\include\xutility(1156) : error C2766: explicit specialization; 'std::_Ptr_cat_helper' has already been defined c:\program files\microsoft visual studio 8\vc\include\xutility(1069) : see previous definition of '_Ptr_cat_helper' c:\program files\microsoft visual studio 8\vc\include\xutility(1162) : error C2766: explicit specialization; 'std::_Ptr_cat_helper' has already been defined c:\program files\microsoft visual studio 8\vc\include\xutility(1075) : see previous definition of '_Ptr_cat_helper' c:\program files\microsoft visual studio 8\vc\include\ostream(262) : error C2535: 'std::basic_ostream<_Elem,_Traits> &std::basic_ostream<_Elem,_Traits>::operator <<(std::_Bool)' : member function already defined or declared c:\program files\microsoft visual studio 8\vc\include\ostream(188) : see declaration of 'std::basic_ostream<_Elem,_Traits>::operator <<' c:\program files\microsoft visual studio 8\vc\include\ostream(581) : see reference to class template instantiation 'std::basic_ostream<_Elem,_Traits>' being compiled c:\program files\microsoft visual studio 8\vc\include\ostream(262) : error C2535: 'std::basic_ostream<_Elem,_Traits> &std::basic_ostream<_Elem,_Traits>::operator <<(std::_Bool)' : member function already defined or declared with [ _Elem=char, _Traits=std::char_traits ] c:\program files\microsoft visual studio 8\vc\include\ostream(188) : see declaration of 'std::basic_ostream<_Elem,_Traits>::operator <<' with [ _Elem=char, _Traits=std::char_traits ] c:\program files\microsoft visual studio 8\vc\include\ostream(639) : see reference to class template instantiation 'std::basic_ostream<_Elem,_Traits>' being compiled with [ _Elem=char, _Traits=std::char_traits ] c:\program files\microsoft visual studio 8\vc\include\ostream(262) : error C2535: 'std::basic_ostream<_Elem,_Traits> &std::basic_ostream<_Elem,_Traits>::operator <<(std::_Bool)' : member function already defined or declared with [ _Elem=wchar_t, _Traits=std::char_traits ] c:\program files\microsoft visual studio 8\vc\include\ostream(188) : see declaration of 'std::basic_ostream<_Elem,_Traits>::operator <<' with [ _Elem=wchar_t, _Traits=std::char_traits ] c:\program files\microsoft visual studio 8\vc\include\ostream(640) : see reference to class template instantiation 'std::basic_ostream<_Elem,_Traits>' being compiled with [ _Elem=wchar_t, _Traits=std::char_traits ] c:\program files\microsoft visual studio 8\vc\include\istream(248) : error C2535: 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::_Bool &)' : member function already defined or declared c:\program files\microsoft visual studio 8\vc\include\istream(175) : see declaration of 'std::basic_istream<_Elem,_Traits>::operator >>' c:\program files\microsoft visual studio 8\vc\include\istream(842) : see reference to class template instantiation 'std::basic_istream<_Elem,_Traits>' being compiled c:\program files\microsoft visual studio 8\vc\include\istream(248) : error C2535: 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::_Bool &)' : member function already defined or declared with [ _Elem=char, _Traits=std::char_traits ] c:\program files\microsoft visual studio 8\vc\include\istream(175) : see declaration of 'std::basic_istream<_Elem,_Traits>::operator >>' with [ _Elem=char, _Traits=std::char_traits ] c:\program files\microsoft visual studio 8\vc\include\istream(886) : see reference to class template instantiation 'std::basic_istream<_Elem,_Traits>' being compiled with [ _Elem=char, _Traits=std::char_traits ] c:\program files\microsoft visual studio 8\vc\include\istream(248) : error C2535: 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::_Bool &)' : member function already defined or declared with [ _Elem=wchar_t, _Traits=std::char_traits ] c:\program files\microsoft visual studio 8\vc\include\istream(175) : see declaration of 'std::basic_istream<_Elem,_Traits>::operator >>' with [ _Elem=wchar_t, _Traits=std::char_traits ] c:\program files\microsoft visual studio 8\vc\include\istream(887) : see reference to class template instantiation 'std::basic_istream<_Elem,_Traits>' being compiled with [ _Elem=wchar_t, _Traits=std::char_traits ] Build log was saved at "file://c:\Documents and Settings\Morten\My Documents\Visual Studio 2005\Projects\dbframework\dbframework\Debug\BuildLog.htm" dbframework - 9 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== You can get the entire project from http://nerdheaven.dk/~cure/dbframework.zip (very small project) if you feel like helping out. Thanks in advance /mopos
Enigma
Enigma
Something is probably doing a #define _Bool int. Find it and fix it.

EDIT: Actually it's more likely a #define bool int.

Σnigma
mopos
mopos
Quote:
Original post by Enigma
Something is probably doing a #define _Bool int. Find it and fix it.

EDIT: Actually it's more likely a #define bool int.

Σnigma


Something? That something is in the mysql header files then?
Enigma
Enigma
Most likely. I've never compiled mysql and can't be bothered to download the source, so I can't be sure.

Σnigma

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.