Overview
Features
Download
Documentation
Community
Add-Ons & Services

Building ODBC with MinGW

Please post support and help requests here.

Building ODBC with MinGW

Postby mlotfy » 16 Jun 2012, 00:26

I completely failed to build the POCO library (Data component) with MinGW on windows (XP).
I used the last version of MinGW (4.6.2). Is there any trusted way to do that since I need the (Data component) very much in order to (ODBC) connect to a database?
I build all libraries successfully on Linux, but in window - using MinGw - repeated failure.
mlotfy
 
Posts: 3
Joined: 16 Jun 2012, 00:15

Re: Building ODBC with MinGW

Postby alex » 16 Jun 2012, 19:37

Use Visual Studio Express.
alex
 
Posts: 1123
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Building ODBC with MinGW

Postby mlotfy » 17 Jun 2012, 18:23

I prefere using MinGW not VC++ compiler, since MinGW supports more C++11 standards - which I need to do all my coming code with it - . Also, MinGW enables me to write code that can be easily compiled in both Windows and Linux.
So, still the question is: did any one do compiling the Poco in windows using the MinGW????
mlotfy
 
Posts: 3
Joined: 16 Jun 2012, 00:15

Re: Building ODBC with MinGW

Postby alex » 17 Jun 2012, 18:38

There's been some work done recently with Cygwin and MinGW but I'm not familiar with details. Jiang Shan can provide more details, if he is following the thread.

Generally speaking, we do not officially support MinGW. Anyone wanting to step in and volunteer is welcome to do so, we will support the effort.
alex
 
Posts: 1123
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Building ODBC with MinGW

Postby SalvorHardin » 20 Jun 2012, 06:51

You didn't mention which version of Poco you were building. But this might be worth a look:

http://poco.svn.sourceforge.net/viewvc/ ... ision=1834

I use Visual C++ 2010 Pro on Windows, but using MinGW seems attractive since I use gcc 4.6.3 on Ubuntu 12.04 LTS.

Good luck and let us know how it goes!
SalvorHardin
 
Posts: 29
Joined: 24 Aug 2010, 14:47

Re: Building ODBC with MinGW

Postby pasorobo » 23 Jun 2012, 14:27

mlotfy wrote:I completely failed to build the POCO library (Data component) with MinGW on windows (XP).
I used the last version of MinGW (4.6.2). Is there any trusted way to do that since I need the (Data component) very much in order to (ODBC) connect to a database?
I build all libraries successfully on Linux, but in window - using MinGw - repeated failure.


First, as SalvorHardin said, please update to rev 1834 for you MingW build. Without this POCO can not be built on you MingW 4.6.2.

And for ODBC build, I just updated the Makefile for branch 1.4.4 (rev 1854), would you please check it ?

If you can not use branch 1.4.4, just change your ODBC Makefile like this patch file:

Code: Select all
@@ -15,7 +15,9 @@
 SYSLIBS += -L/usr/local/lib/odbc -L/usr/lib/odbc -L/usr/lib -L/usr/local/lib
 
 ifeq ($(POCO_CONFIG),MinGW)
-# Lack of unixODBC or iODBC is not an error for MinGW platform since it uses Windows odbc32.lib
+# -DODBCVER=0x0300: SQLHandle declaration issue
+# -DNOMINMAX      : MIN/MAX macros defined in windows conflict with libstdc++
+CXXFLAGS += -DODBCVER=0x0300 -DNOMINMAX
 else
 ifeq ($(POCO_CONFIG),CYGWIN)
 # -DODBCVER=0x0300: SQLHandle declaration issue


Jiang (a.k.a pasorobo)
pasorobo
 
Posts: 5
Joined: 01 Jun 2012, 19:24

Re: Building ODBC with MinGW

Postby mlotfy » 28 Jun 2012, 13:38

Thank you so much pasorobo, I did it.
mlotfy
 
Posts: 3
Joined: 16 Jun 2012, 00:15


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest