MySQL Forums
Forum List  »  Source, Builds, Binaries

mingw port of mysql connector c and c++
Posted by: Martin Trautmann
Date: June 30, 2011 02:01AM

Eclipse + Mingw is a great build environment but the hurdles to access mysql connector c and c++ are quite high despite several useful comments of how to setup the binary versions.

I took a different route and modified the source code to work with mingw. Mostly it was sufficient to add the correct behavior if WIN32 and __MINGW32__ is defined.

Compiling cmake with mingw worked fine for me:
1) download and extract
2) run "./configure"
3) run "make"
4) run "make install" <== this needs priviledges to write to Program Files folder
5) include CMake directory in PATH

Compiling the mysql connector c:
1) extract mysql-connector-c-6.0.2.mingw-port.tgz
2) run "cmake -G 'MSYS Makefiles'"
3) run "make"
4) run "make install"
5) include libmysql directory in PATH to use mysql_config for building your application or for building mysql connector c++

Compiling mysql connector c++ works analogous to mysql connector c except that mysql_config needs to be in PATH for the configuration to work.

Technical details:

Regarding the BIG_ENDIAN check of cmake I did not find a good way of making it optional. So feel free to make proposals of how to improve the patch possibly for later inclusion into the main source code. Getting mysql_config right for english versions of Windows with a space in "C:\Program Files" is quite tricky. I hope that I got this right but comments/suggestions are welcome.

Edited 2 time(s). Last edit at 06/30/2011 07:50AM by Martin Trautmann.

Options: ReplyQuote

Written By
mingw port of mysql connector c and c++
June 30, 2011 02:01AM
September 18, 2011 07:04AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.