Skip navigation links

MySQL Forums :: Source, Builds, Binaries :: mingw port of mysql connector c and c++


Advanced Search

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.

https://sourceforge.net/projects/windiana.u/files/mysql/port-mingw/

Compiling cmake with mingw worked fine for me:
1) download and extract http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
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


Subject Views Written By Posted
mingw port of mysql connector c and c++ 12466 Martin Trautmann 06/30/2011 02:01AM
Re: mingw port of mysql connector c and c++ 3595 Creative Team 07/14/2011 11:32PM
Re: mingw port of mysql connector c and c++ 2584 Martin Trautmann 07/15/2011 03:59AM
Re: mingw port of mysql connector c and c++ 2044 jack pot 07/16/2011 02:14AM
Re: mingw port of mysql connector c and c++ 2085 Martin Trautmann 07/18/2011 01:03AM
Re: mingw port of mysql connector c and c++ 2491 John Thomas 09/09/2011 06:02PM
i want to access mysql from turbo c++ 1855 sanjeev sanehi 09/18/2011 07:04AM
Re: i want to access mysql from turbo c++ 1680 Gerhard Smith 01/25/2012 11:29AM
Re: mingw port of mysql connector c and c++ 1620 jake larson 12/15/2011 09:29AM
Re: mingw port of mysql connector c and c++ 1426 mike white 04/01/2012 04:02PM


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.