Warren Young wrote:
> On Jul 7, 2009, at 9:28 AM, Warren Young wrote:
>> I recall that there is a build setting...
> Oh, hey, look what I just found in svn:
> Building MySQL++ for 64-Bit
> The MySQL++ Visual Studio project files ship with the assumption
> that you're building for 32-bit Windows. While the utility
> of running the MySQL server on a 64-bit system is clear, that
> doesn't mandate running its client programs in 64-bit mode, too.
> As a result, we haven't yet bothered to come up with an easy way
> to change this. Here's the hard way:
> - Follow the steps above to change the MySQL install location,
> if necessary.
> - Open the solution file, then say Build > Configuration Manager
> - Pull down the "Active solution platform" list box, say New...,
> and add "x64", copying settings from the Win32 build, and
> allowing it to create new project platforms.
> - Pull the same list box down, say Edit..., and remove the Win32
> build, unless you actually need both versions.
> It should then build, except that you may have to re-run the
> build a couple of times, due to errors about the build log being
> unwritable or locked. Just re-run the build until you get all of
> the projects to build. If re-running the build doesn't reduce
> the number of failures, you have something else wrong, perhaps
> due to not following the instructions above carefully. It might
> be simplest to just blow away the MySQL++ tree and try again.
> (I did once, while formulating these instructions...sigh.)
It worked when I followed your instructions. Thanks ! Lots of strange
conversion warning about possible loss of data converting between
'size_t' and 'int','long' etc, ( maybe size_t is 64 bits in x64 ) which
I ignored and continuous messages about not being able to write to the
build log file ( even after I blew away the intermediate directories
tree ) but I think I am OK nonetheless.
I believe, however, that the DLLs and import library names should be
different for the 32-bit version and 64-bit version of MySQL. This goes
not only for the mysqlpp.dll ( and mysqlpp_d.dll ) but also for the
libmysql.dll distributed as part of the MySQL server installation. It is
just too easy to accidentally mix 32 bit and 64 bit shared libraries if
they have the same name. Appending '64' to both sets of names for x64
should be ideally adequate. This is of course just my opinion, and I
understand it would be pretty worthless for you to distinguish the
mysql++ names for 32 and 64 bit if the MySQL C developers are not
willing to do so also.
Finally, although it does not make a difference in actuality, would it
not be better in principle for the 'debug' build to link to the MySQL C
import library in the MySQL server lib/debug directory and the 'release'
build to link to the MySQL C import library in the MySQL server lib/opt
directory. Currently both go to the lib/opt directory.