2 messages in com.mysql.lists.mysqlRe: C API - Mysql 5| From | Sent On | Attachments |
|---|---|---|
| Vinc...@alcatel.fr | 25 Oct 2006 06:51 | |
| Gabriel Linder | 25 Oct 2006 07:43 |
| Subject: | Re: C API - Mysql 5![]() |
|---|---|
| From: | Gabriel Linder (lin...@jeuxvideo.com) |
| Date: | 10/25/2006 07:43:42 AM |
| List: | com.mysql.lists.mysql |
Hello,
Did you try to convert the .lib file to a GCC .a library ? See http://mingw.org/mingwfaq.shtml#faq-msvcdll
If reimp doesn't work, you can try pexports and dlltool. I have an old batch file I used for older MySQL versions at http://athanatos.free.fr/EXE/implib.bat
Vinc...@alcatel.fr a écrit :
Hello,
I'm trying to compile some C code with the simple following code (dev-c++):
#include <stdio.h> #include <stdlib.h> #include <windows.h> #include <mysql.h>
int main(int argc, char *argv[]) { MYSQL * mysql_con = NULL;
mysql_con = mysql_init(mysql_con);
return 0; }
As the result, i obtain this :
gcc.exe -D__DEBUG__ main.o -o "my_try.exe" -L"C:/Dev-Cpp/lib" "C:/Program Files/MySQL/MySQL Server 5.0/lib/debug/mysqlclient.lib" -g3
C:/Program Files/MySQL/MySQL Server 5.0/lib/debug/mysqlclient.lib(./debug/client.obj)(.debug$S+0x49cb):\build\mysql-5.0.2: variable '_iob' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details. C:/Program Files/MySQL/MySQL Server 5.0/lib/debug/mysqlclient.lib(./debug/client.obj)(.text+0x192e): In function `mysql_read_default_options': e:\build\mysql-5.0:1026: variable '_iob' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details. C:/Program Files/MySQL/MySQL Server 5.0/lib/debug/mysqlclient.lib(./debug/dbug.obj)(.debug$S+0x24c1):\build\mysql-5.0.2: variable '_iob' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details. C:/Program Files/MySQL/MySQL Server 5.0/lib/debug/mysqlclient.lib(./debug/dbug.obj)(.text+0x15): In function `_db_push_':
I've compiled C code with a previous version of mysql lib client without any trouble. I've tried with the --enable-auto-import as well as the disable one. Anyone have an idea?
Thank's in advance Vincent Badier
-- Cordialement Gabriel LINDER / JEUXVIDEO.COM
--------------------------------------------------------------------------- http://www.jeuxvideo.com : Le site numéro 1 des jeux video en français http://boutique.jeuxvideo.com : Pour acheter tous ses jeux sur le net
---------------------------------------------------------------------------




