使用mingw编译mysql-connector-C

时间:2013-06-07 21:22:10

标签: mysql c gcc mingw

我安装了一个包含gcc 4.7的MSYS的新副本,并尝试构建mysql-connector-c-6.1.0

通过运行cmake -G“MSYS Makefiles”,我可以毫无问题地生成CMake文件,但是当我运行make时,我收到以下错误消息:

In file included from c:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/client/get_password.c:20:0:
C:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/include/my_global.h:768:0: warning: "isnan" redefined [enabled by default]
In file included from C:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/include/my_global.h:317:0,
             from c:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/client/get_password.c:20:
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/math.h:411:0: note: this is the location of the previous definition
In file included from C:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/include/my_sys.h:44:0,
             from c:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/client/get_password.c:21:
C:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/include/my_pthread.h:59:3: error: unknown type name 'CONDITION_VARIABLE'
In file included from C:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/include/my_sys.h:44:0,
             from c:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/client/get_password.c:21:
C:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/include/my_pthread.h:682:5: error: unknown type name 'SRWLOCK'
c:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/client/get_password.c: In function 'yassl_mysql_get_tty_password_ext':
c:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/client/get_password.c:90:5: warning: implicit declaration of function 'iscntrl' [-Wimplicit-function-declaration]
c:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/client/get_password.c:95:3: warning: implicit declaration of function 'isspace' [-Wimplicit-function-declaration]
c:/MinGW/msys/1.0/home/developers/mysql-connector-c-6.1.0-src/client/get_password.c:72:7: warning: unused variable 'i' [-Wunused-variable]
make[2]: *** [extra/yassl/CMakeFiles/yassl.dir/__/__/client/get_password.c.obj]
Error 1
make[1]: *** [extra/yassl/CMakeFiles/yassl.dir/all] Error 2
make: *** [all] Error 2

有没有人有幸使用Mingw通过MSYS构建mysql连接器?

感谢。

0 个答案:

没有答案