Hi everyone, 

I have recently downloaded mysql version 4.0.20 for Windows and I'm trying
to develop a client application in c++ using Microsoft Visual Studio 6.0. I
am having a few issues. Note, neither of these problems occur if I install
on RedHat Linux 7.3:

1) My client will not compile because my_globals.h is looking for a file
called my_dbug.h. This file is not included in the mysql installation, but I
did find a file called dbug.h. If I rename dbug.h to my_dbug.h this problem
goes away.

2) After finding a work around for problem 1, I am able to get client
applications to compile. But, it appears there is a conflict between mysql
and the standard template library. Specifically, The swap macro defined in
my_globals.h appears to conflict with std::swap. Here is a small example
that will generate the problem. I'm also including the errors list. Can
anyone help me or direct me to the appropriate spot to find help?

=================
Code:
=================

#include <my_global.h>
#include <mysql.h>

#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
 return 0;
}

=================
Errors:
=================

Compiling...
TestXML.cpp
c:\program files\microsoft visual studio\vc98\include\xutility(99) : error
C2059: syntax error : '<end Parse>'
c:\program files\microsoft visual studio\vc98\include\xutility(100) : error
C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio\vc98\include\xutility(100) : error
C2447: missing function header (old-style formal list?)
c:\program files\microsoft visual studio\vc98\include\xstring(19) : error
C2954: template definitions cannot nest
c:\program files\microsoft visual studio\vc98\include\xstring(41) : error
C2065: '_Al' : undeclared identifier
        c:\program files\microsoft visual studio\vc98\include\xstring(597) :
see reference to class template instantiation 'std::basic_string<_E,_Tr,_A>'
being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(41) : error
C2440: 'type cast' : cannot convert from 'int' to 'class std::allocator'
        The target type has no constructors
        c:\program files\microsoft visual studio\vc98\include\xstring(597) :
see reference to class template instantiation 'std::basic_string<_E,_Tr,_A>'
being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(41) : error
C2056: illegal expression
        c:\program files\microsoft visual studio\vc98\include\xstring(597) :
see reference to class template instantiation 'std::basic_string<_E,_Tr,_A>'
being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(41) : error
C2071: 'basic_string<_E,_Tr,_A>::basic_string<_E,_Tr,_A>' : illegal storage
class
        c:\program files\microsoft visual studio\vc98\include\xstring(597) :
see reference to class template instantiation 'std::basic_string<_E,_Tr,_A>'
being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(41) : error
C2461: 'basic_string<_E,_Tr,_A>' : constructor syntax missing formal
parameters
        c:\program files\microsoft visual studio\vc98\include\xstring(597) :
see reference to class template instantiation 'std::basic_string<_E,_Tr,_A>'
being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(42) : error
C2146: syntax error : missing ';' before identifier 'basic_string'
        c:\program files\microsoft visual studio\vc98\include\xstring(597) :
see reference to class template instantiation 'std::basic_string<_E,_Tr,_A>'
being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(600) : error
C2039: 'npos' : is not a member of 'basic_string<_E,_Tr,_A>'
c:\program files\microsoft visual studio\vc98\include\xstring(600) : error
C2734: 'npos' : const object must be initialized if not extern
c:\program files\microsoft visual studio\vc98\include\xstring(600) : error
C2734: 'npos' : const object must be initialized if not extern
c:\program files\microsoft visual studio\vc98\include\xstring(371) : error
C2059: syntax error : '{'
        c:\program files\microsoft visual studio\vc98\include\stdexcept(29)
: see reference to class template instantiation
'std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(371) : error
C2334: unexpected token(s) preceding '{'; skipping apparent function body
        c:\program files\microsoft visual studio\vc98\include\stdexcept(29)
: see reference to class template instantiation
'std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(372) : error
C2059: syntax error : '{'
        c:\program files\microsoft visual studio\vc98\include\stdexcept(29)
: see reference to class template instantiation
'std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(372) : error
C2334: unexpected token(s) preceding '{'; skipping apparent function body
        c:\program files\microsoft visual studio\vc98\include\stdexcept(29)
: see reference to class template instantiation
'std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(378) : error
C2059: syntax error : '{'
        c:\program files\microsoft visual studio\vc98\include\stdexcept(29)
: see reference to class template instantiation
'std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(378) : error
C2334: unexpected token(s) preceding '{'; skipping apparent function body
        c:\program files\microsoft visual studio\vc98\include\stdexcept(29)
: see reference to class template instantiation
'std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(379) : error
C2059: syntax error : '{'
        c:\program files\microsoft visual studio\vc98\include\stdexcept(29)
: see reference to class template instantiation
'std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(379) : error
C2334: unexpected token(s) preceding '{'; skipping apparent function body
        c:\program files\microsoft visual studio\vc98\include\stdexcept(29)
: see reference to class template instantiation
'std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\ostream(106) : error
C2535: 'class std::basic_ostream<_E,_Tr> &__thiscall
std::basic_ostream<_E,_Tr>::operator <<(int)' : member function already
defined or declared
        c:\program files\microsoft visual studio\vc98\include\ostream(66) :
see declaration of '<<'
        c:\program files\microsoft visual studio\vc98\include\ostream(272) :
see reference to class template instantiation 'std::basic_ostream<_E,_Tr>'
being compiled
c:\program files\microsoft visual studio\vc98\include\ostream(106) : error
C2535: 'class std::basic_ostream<char,struct std::char_traits<char> >
&__thiscall std::basic_ostream<char,struct std::char_traits<char>
>::operator <<(int)' : member function
 already defined or declared
        c:\program files\microsoft visual studio\vc98\include\ostream(66) :
see declaration of '<<'
        c:\program files\microsoft visual studio\vc98\include\ostream(373) :
see reference to class template instantiation
'std::basic_ostream<char,struct std::char_traits<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\ostream(106) : error
C2535: 'class std::basic_ostream<unsigned short,struct
std::char_traits<unsigned short> > &__thiscall std::basic_ostream<unsigned
short,struct std::char_traits<unsigned short
> >::operator <<(int)' : member function already defined or declared
        c:\program files\microsoft visual studio\vc98\include\ostream(66) :
see declaration of '<<'
        c:\program files\microsoft visual studio\vc98\include\ostream(379) :
see reference to class template instantiation 'std::basic_ostream<unsigned
short,struct std::char_traits<unsigned short> >' being compiled
c:\program files\microsoft visual studio\vc98\include\istream(103) : error
C2535: 'class std::basic_istream<_E,_Tr> &__thiscall
std::basic_istream<_E,_Tr>::operator >>(int &)' : member function already
defined or declared
        c:\program files\microsoft visual studio\vc98\include\istream(67) :
see declaration of '>>'
        c:\program files\microsoft visual studio\vc98\include\istream(423) :
see reference to class template instantiation 'std::basic_istream<_E,_Tr>'
being compiled
c:\program files\microsoft visual studio\vc98\include\istream(103) : error
C2535: 'class std::basic_istream<char,struct std::char_traits<char> >
&__thiscall std::basic_istream<char,struct std::char_traits<char>
>::operator >>(int &)' : member functi
on already defined or declared
        c:\program files\microsoft visual studio\vc98\include\istream(67) :
see declaration of '>>'
        c:\program files\microsoft visual studio\vc98\include\istream(544) :
see reference to class template instantiation
'std::basic_istream<char,struct std::char_traits<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\istream(103) : error
C2535: 'class std::basic_istream<unsigned short,struct
std::char_traits<unsigned short> > &__thiscall std::basic_istream<unsigned
short,struct std::char_traits<unsigned short
> >::operator >>(int &)' : member function already defined or declared
        c:\program files\microsoft visual studio\vc98\include\istream(67) :
see declaration of '>>'
        c:\program files\microsoft visual studio\vc98\include\istream(564) :
see reference to class template instantiation 'std::basic_istream<unsigned
short,struct std::char_traits<unsigned short> >' being compiled
Error executing cl.exe.

TestXML.exe - 27 error(s), 0 warning(s)


**********************************************************************
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to