Windows compilation errors C2766, C2535

Windows compilation errors C2766, C2535

am 19.09.2007 00:56:04 von Ron Hu

------=_NextPart_000_0003_01C7FA0C.6C58A9D0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi,

I created a new library to be linked with mysqld.exe. My code has the
following include files:

#include "mysql_priv.h"
#include
#include
#include "my_dir.h"

#include
#include
#include

#include "mysql/plugin.h"

I first built MySQL5.1 code without my library using Windows Visual Studio
2005. It succeeded without problem. Then I tried to compile my library and
received these error messages:

C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(720) : error
C2766: explicit specialization; 'std::iterator_traits' has already been
defined
C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(641)
: see previous definition of 'iterator_traits'
C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(1200) : error
C2766: explicit specialization; 'std::_Ptr_cat_helper' has already been
defined
C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(1111)
: see previous definition of '_Ptr_cat_helper'
C:\Program Files\Microsoft Visual Studio 8\VC\include\ostream(268) : 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(194) :
see declaration of 'std::basic_ostream<_Elem,_Traits>::operator <<'
C:\Program Files\Microsoft Visual Studio 8\VC\include\ostream(587) :
see reference to class template instantiation
'std::basic_ostream<_Elem,_Traits>' being compiled

It appears that C++ STL class has conflicts
with the existing MySQL header files. Any comments will be greatly
appreciated.

Thanks.

-Ron


------=_NextPart_000_0003_01C7FA0C.6C58A9D0--