Sign in to follow this  

Possible bug with VS2005 and STL or MySQL 5.0?

This topic is 4222 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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<std::_Bool>' 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<std::_Bool*,std::_Bool*>' 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<const std::_Bool*,std::_Bool*>' 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<std::_Bool>' has already been defined c:\program files\microsoft visual studio 8\vc\include\xutility(610) : see previous definition of 'iterator_traits<int>' c:\program files\microsoft visual studio 8\vc\include\xutility(1156) : error C2766: explicit specialization; 'std::_Ptr_cat_helper<std::_Bool*,std::_Bool*>' has already been defined c:\program files\microsoft visual studio 8\vc\include\xutility(1069) : see previous definition of '_Ptr_cat_helper<int *,int *>' c:\program files\microsoft visual studio 8\vc\include\xutility(1162) : error C2766: explicit specialization; 'std::_Ptr_cat_helper<const std::_Bool*,std::_Bool*>' has already been defined c:\program files\microsoft visual studio 8\vc\include\xutility(1075) : see previous definition of '_Ptr_cat_helper<int const *,int *>' 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<char> ] 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<char> ] 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<char> ] 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<wchar_t> ] 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<wchar_t> ] 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<wchar_t> ] 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<char> ] 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<char> ] 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<char> ] 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<wchar_t> ] 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<wchar_t> ] 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<wchar_t> ] 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

Share this post


Link to post
Share on other sites
Something is probably doing a #define _Bool int. Find it and fix it.

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

Σnigma

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

This topic is 4222 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this