Warren Young wrote:
>
> The main MySQL++ headers used to #include <my_global.h> before mysql.h,
> which pulls in a lot of this C-ish stuff needed by mysql.h. That
> conflicts with C++ things like std::min/max, so now we define the things
> my_global.h does manually within MySQL++, in C++ terms, before pulling
> in mysql.h.
>
> Perhaps this Windows header isn't satisfied with our C emulations? You
> may have to #include <stdlib.h> or something like that between mysql++.h
> and windows.h (?).
>
> In the current version, you can see how this works in lib/common.h. I'm
> pretty sure this used to be in a different file in earlier versions
> (perhaps platform.h or mysql++.h?) so if you go comparing, you'll need
> to poke around a bit to find the equivalent sections.
>
Hi There,
Just to report I found the lines which were causing me a problem in file
lib/common.h
// The MySQL headers define these macros, which is completely wrong in a
// C++ project. Undo the damage.
#undef min
#undef max
The trouble is Windows also defines these as global macros in various
files including the WinDef.h file, so other header files which assume
their existence (not many of them admittedly) may no longer compile
depending on order of #includes I guess.
Thanks anyway.
Paul Aitman.