MySQL and MinGW/MSYS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MySQL and MinGW/MSYS

Mark Cianfaglione
I've been working on an application which I want to run on Linux and
Windows and everything is fine with the Linux version (of course!) but the
Windows version is another story.

On a Windows XP Pro (32 Bit) machine I've installed MinGW(latest) and
MSYS(latest) and GTK and I've also installed MySQL(5.1) for Windows making
sure to have added the development bits as well.

I've created a Makefile (different from the Linux Makefile) that ensures
all the appropriate include paths are there and the library paths. As a
matter of fact the preprocessing part works fine and the linking part for
the GTK part is OK but the MySQL linking part is buggered.(get a lot of
"undefined reference" errors)

I understand that the MySQL libraries are not using GCC so there is a
difference in the library internal structure.( and so that's the reason
for the undefined reference errors)  I attempted to use REIMP to convert
the MySQL ".lib"s to the ".a" format that GCC likes but it spits out an
error saying that the ".lib" format is not one that it recognizes. PEXPORT
works on the DLLs but MySQL does not distribute a DLL for "mysqlclient".

OK... then download the MySQL source and try to compile it on MinGW.... It
configures OK but it does not compile. The error is not exactly
descriptive either.

My questions are:

1) Is there a method that I don't know about to REIMP the Windows variant
of the MySQL libraries? And how can this be done.

2) Can I compile MySQL using CygWin's GCC and use those libraries in MinGW?

3) is there any other tools that can convert the Windows library format to
the GCC format?

Thanks a million....

Mark


--


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL and MinGW/MSYS

jayshankar nair

Hi,

Download the mysql connector 6.0 source and compile with cmake 2.6. Some  minor changes to makefile is required.

The mysqlclient library works fine.

Thanks,
Jay


--- On Sat, 12/12/09, Mark Cianfaglione <[hidden email]> wrote:

> From: Mark Cianfaglione <[hidden email]>
> Subject: [Mingw-users] MySQL and MinGW/MSYS
> To: [hidden email]
> Date: Saturday, December 12, 2009, 8:23 AM
> I've been working on an application
> which I want to run on Linux and
> Windows and everything is fine with the Linux version (of
> course!) but the
> Windows version is another story.
>
> On a Windows XP Pro (32 Bit) machine I've installed
> MinGW(latest) and
> MSYS(latest) and GTK and I've also installed MySQL(5.1) for
> Windows making
> sure to have added the development bits as well.
>
> I've created a Makefile (different from the Linux Makefile)
> that ensures
> all the appropriate include paths are there and the library
> paths. As a
> matter of fact the preprocessing part works fine and the
> linking part for
> the GTK part is OK but the MySQL linking part is
> buggered.(get a lot of
> "undefined reference" errors)
>
> I understand that the MySQL libraries are not using GCC so
> there is a
> difference in the library internal structure.( and so
> that's the reason
> for the undefined reference errors)  I attempted to
> use REIMP to convert
> the MySQL ".lib"s to the ".a" format that GCC likes but it
> spits out an
> error saying that the ".lib" format is not one that it
> recognizes. PEXPORT
> works on the DLLs but MySQL does not distribute a DLL for
> "mysqlclient".
>
> OK... then download the MySQL source and try to compile it
> on MinGW.... It
> configures OK but it does not compile. The error is not
> exactly
> descriptive either.
>
> My questions are:
>
> 1) Is there a method that I don't know about to REIMP the
> Windows variant
> of the MySQL libraries? And how can this be done.
>
> 2) Can I compile MySQL using CygWin's GCC and use those
> libraries in MinGW?
>
> 3) is there any other tools that can convert the Windows
> library format to
> the GCC format?
>
> Thanks a million....
>
> Mark
>
>
> --
>
>
> ------------------------------------------------------------------------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> _______________________________________________
> MinGW-users mailing list
> [hidden email]
>
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same.  Disregard
> for the list etiquette may cause your account to be
> moderated.
>
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe
> at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
>


     

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users