my_global.h causes a lot of problems
"Morten B. Post" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.windows |
|---|---|
| Message-ID | <[email protected]> |
Hi, Im currently making a small database wrapper in c++ using the mysql c api on windows (using visual studio 2005). I'm using mysql 5.0 and according to http://dev.mysql.com/doc/refman/5.0/en/windows-client-compiling.html my_global.h should always be included before mysql.h. I've used #include <my_global.h> #include <mysql.h> in a few of my class definition header files and works well. However when i add those two lines to a new file which im working on I get a lot of error messages like this: Error 1 error C2766: explicit specialization; 'std::iterator_traits<std::_Bool>' has already been defined d:\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 d:\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 d:\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 d:\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 d:\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 d:\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 d:\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 d:\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 d:\program files\microsoft visual studio 8\vc\include\istream 248 Error 10 error C2511: 'SqlDataReader::SqlDataReader(SqlCommand *)' : overloaded member function not found in 'SqlDataReader' d:\documents and settings\morten\my documents\visual studio 2005\projects\dbframework\dbframework\sqldatareader.cpp 4 Error 11 fatal error C1004: unexpected end-of-file found d:\documents and settings\morten\my documents\visual studio 2005\projects\dbframework\dbframework\sqldatareader.cpp 7 Error 12 error C2664: 'SqlDataReader::SqlDataReader(const SqlDataReader &)' : cannot convert parameter 1 from 'SqlCommand *const ' to 'const SqlDataReader &' d:\documents and settings\morten\my documents\visual studio 2005\projects\dbframework\dbframework\sqlcommand.cpp 98 As you can see it's related to bool. HOwever if I remove #include <my_global.h> and just #include <windows.h> all is well. Would it be safe to avoid my_global.h completely.... or does anyone have a fix for this? More details here: http://www.gamedev.net/community/forums/topic.asp?topic_id=394411 -- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/[email protected]