List:Connector/C++« Previous MessageNext Message »
From:Robert Latest Date:November 21 2012 3:38pm
Subject:Trouble with MinGW and mysql-connector
View as plain text  
Hello all,

I've downloaded cmake and the mingw port of the connector sources
(mysql-connector-c-6.0.2.mingw-port.tgz) and followed the
instructions.

The cmake run works fine. I'm running cmake from the "CMD.EXE" prompt
because for some reason it refuses to run out of a MSYS console
because sh.exe is in the path. Go figure. Anyway, when I type "make"
(this time from MSYS's bash because CMD.EXE doesn't know about MinGW's
make or binutils), I get dropped into a CMD shell and have to type
"exit" five or six times until I'm back on the bash level. In other
words, had I typed "cmd" six times instead of "make" once, the effect
would have been the same. "make" doesn't do anything. Needless to say,
I'm stumped at this point.

That's one problem. Leaving that aside I wanted to find out if at
least my application would compile, so I copied the connector's .h
files into /c/MinGW/include/mysql. When trying to compile my program,
I get these errors:

In file included from
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/mysql/mysql.h:71:0,
                 from dbal_mysql.c:5:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/mysql/mysql_com.h:268:3:
error: expected specifier-qualifier-list before 'SOCKET'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/mysql/mysql_com.h:437:26:
error: expected ')' before 's'
make: *** [dbal_mysql.o] Error 1

On Linux my program compiles silently with all gcc warnings turned on.

What's going on here?
Thanks,
robert
Thread
Trouble with MinGW and mysql-connectorRobert Latest21 Nov