Leonti Bielski wrote:
> I'm sorry - I used Makefile.mingw. Sorry for the confusion.
No problem. Would you look over this final set of instructions, to see
if I've interpreted it all correctly?
> Building on Linux
> ~~~~~~~~~~~~~~~~~
> You might need to build Windows executables while not actually
> running Windows. You might think to use MinGW, being a port
> of GCC, the standard compiler on almost every non-Windows OS
> these days.
>
> The best way to do this is to run MinGW under either Wine or
> some sort of virtual machine running an actual copy of Windows.
> Leonti Bielski provided these instructions for the Wine method:
>
> 1. Install MinGW through Wine:
>
> $ wine MinGW-5.1.6.exe
>
> 2. Add the MinGW directory to Wine's PATH with Wine regedit:
>
> http://winehq.org/site/docs/wineusr-guide/environment-variables
>
> 3. Install MySQL under Wine, or at least unpack the Windows
> ZIP file version of MySQL in a place where Wine can find it.
> You don't need to run a Windows MySQL server under Wine.
> We're only doing this to get the MySQL C API library and
> its headers, which MySQL++ builds against. The resulting
> MinGW build of MySQL++ can talk to a native MySQL server
> out in Wine's host environment or on some other machine.
>
> 4. Modify Makefile.mingw to match the install location for
> the MySQL C API files.
>
> 5. Create libmysqlclient.a as described above, except with
> minor differences for running under Wine:
>
> $ wine mingw32-dlltool -k -d /native/path/libmysqlclient.def...
>
> 6. Build MySQL++ with:
>
> $ wine mingw32-make -f Makefile.mingw
>
> You might think it would be simpler to just use a MinGW
> cross-compiler. Unfortunately, this doesn't currently work:
>
> $ ./configure --target=mingw32
> $ make
>
> The reason is that our autoconf build system assumes a
> typical POSIX type target, which MinGW is not. We made this
> assumption because we have a perfectly good MinGW build option,
> Makefile.mingw. But, that also won't work on a POSIX system
> because that Makefile assumes external commands run under cmd.exe,
> not some Unixy shell. Thus the advice to build with Makefile.mingw
> under Windows or something sufficiently close to it.
>
> If you really wanted to, you could extend the autoconf build system
> to make it realize when it's being used to cross-compile for MinGW.
> Patches thoughtfully considered; see HACKERS.txt.