Thread: [Dev-C++] Trying to link libmysqld.lib (Update)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Josep S. <sub...@ar...> - 2004-03-07 13:32:46
|
I thought maybe the lib for embedded mysql that comes with mysql is intended for VisualC++ and that could be the reason why it doesn't work with Dev-C++... I have generated a libmysqld.def file with impdef( http://webclub.kcom.ne.jp/ma/colinp/gcc.html) and then the library libmysqld.a with dlltool (<-- included with mingw) but to no avail: Dev-C++ keeps spitting the same error (see below) log out when trying to compile this new lib! Anyone has an idea??? Compiler: Default compiler Building Makefile: "E:\c++\mysql\devc++\Makefile.win" Executing make clean rm -f EXE/test_dll.o EXE/StdAfx.o EXE/test_dll.exe g++.exe -c test_dll.cpp -o XE/test_dll.o -I"C:/Programme/Dev-Cpp/include/c++" -I"C:/Programme/Dev-Cpp/ include/c++/mingw32" -I"C:/Programme/Dev-Cpp/include/c++/backward" -I"C:/P rogramme/Dev-Cpp/include" -I"E:/c++/mysql/devc++/include" g++.exe -c StdAfx.cpp -o XE/StdAfx.o -I"C:/Programme/Dev-Cpp/include/c++" -I"C:/Programme/Dev-Cpp/in clude/c++/mingw32" -I"C:/Programme/Dev-Cpp/include/c++/backward" -I"C:/Pro gramme/Dev-Cpp/include" -I"E:/c++/mysql/devc++/include" g++.exe EXE/test_dll.o EXE/StdAfx.o -o "EXE\test_dll.exe" -L"C:/Programme/Dev-Cpp/lib" release/libmysqld.a EXE/test_dll.o(.text+0x79):test_dll.cpp: undefined reference to `mysql_server_init@12' EXE/test_dll.o(.text+0xd0):test_dll.cpp: undefined reference to `mysql_close@4' EXE/test_dll.o(.text+0xde):test_dll.cpp: undefined reference to `mysql_close@4' EXE/test_dll.o(.text+0xe6):test_dll.cpp: undefined reference to `mysql_server_end@0' EXE/test_dll.o(.text+0x1aa):test_dll.cpp: undefined reference to `mysql_init@4' EXE/test_dll.o(.text+0x1db):test_dll.cpp: undefined reference to `mysql_options@12' EXE/test_dll.o(.text+0x1f5):test_dll.cpp: undefined reference to `mysql_real_connect@32' EXE/test_dll.o(.text+0x207):test_dll.cpp: undefined reference to `mysql_error@4' |
|
From: <or...@vp...> - 2004-03-07 16:35:34
|
Josep Subirana wrote: > I thought maybe the lib for embedded mysql that comes with mysql is int= ended > for VisualC++ and that could be the reason why it doesn't work with > Dev-C++... >=20 > I have generated a libmysqld.def file with impdef( > http://webclub.kcom.ne.jp/ma/colinp/gcc.html) and then the library > libmysqld.a with dlltool (<-- included with mingw) but to no avail: Dev= -C++ > keeps spitting the same error (see below) log out when trying to compil= e > this new lib! > Anyone has an idea??? Actually, the def file and import library is not needed at all for GCC,=20 as it can use the DLL directly when linking. Can you see the missing symbols in the def file BTW? (Attaching that too would be a good idea) -- Greetings, Bal=E1zs |
|
From: Josep S. <sub...@ar...> - 2004-03-07 20:10:35
|
>>Can you see the missing symbols in the def file BTW? >>(Attaching that too would be a good idea) Yes, the missing symbols are all there. For example mysql_error (Although the compile log refers to something like "mysql_error@4" instead of just "mysql_error": ... [Linker error] undefined reference to `mysql_error@4' ... And here is the .def file (after I created one with impdef, I found there already was one .def file in another directory!): LIBRARY LIBMYSQLD DESCRIPTION 'MySQL 4.0 Embedded Server Library' VERSION 4.0 EXPORTS mysql_server_end mysql_server_init mysql_use_result mysql_thread_safe mysql_thread_id mysql_store_result mysql_stat mysql_shutdown mysql_select_db mysql_row_tell mysql_row_seek mysql_real_query mysql_real_connect mysql_query mysql_ping mysql_options mysql_num_rows mysql_num_fields mysql_list_tables mysql_list_processes mysql_list_fields mysql_list_dbs mysql_kill mysql_insert_id mysql_init mysql_info mysql_get_server_info mysql_get_proto_info mysql_get_host_info mysql_get_client_info mysql_free_result mysql_field_tell mysql_field_count mysql_field_seek mysql_fetch_row mysql_fetch_lengths mysql_fetch_fields mysql_fetch_field_direct mysql_fetch_field mysql_escape_string mysql_real_escape_string mysql_error mysql_errno mysql_eof mysql_dump_debug_info mysql_drop_db mysql_debug mysql_data_seek mysql_create_db mysql_character_set_name mysql_change_user mysql_connect mysql_close mysql_affected_rows mysql_thread_init mysql_thread_end mysql_send_query mysql_read_query_result mysql_refresh mysql_odbc_escape_string myodbc_remove_escape -----Urspr=FCngliche Nachricht----- Von: dev...@li... [mailto:dev...@li...]Im Auftrag von OROSZI Bal=E1zs Gesendet: Sonntag, 7. M=E4rz 2004 17:20 An: dev...@li... Betreff: Re: [Dev-C++] Trying to link libmysqld.lib (Update) Josep Subirana wrote: > I thought maybe the lib for embedded mysql that comes with mysql is intended > for VisualC++ and that could be the reason why it doesn't work with > Dev-C++... > > I have generated a libmysqld.def file with impdef( > http://webclub.kcom.ne.jp/ma/colinp/gcc.html) and then the library > libmysqld.a with dlltool (<-- included with mingw) but to no avail: Dev-C++ > keeps spitting the same error (see below) log out when trying to compil= e > this new lib! > Anyone has an idea??? Actually, the def file and import library is not needed at all for GCC, as it can use the DLL directly when linking. Can you see the missing symbols in the def file BTW? (Attaching that too would be a good idea) -- Greetings, Bal=E1zs ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Daniel K. O. <dan...@ya...> - 2004-03-07 16:38:30
|
Josep Subirana wrote: >I have generated a libmysqld.def file with impdef( >http://webclub.kcom.ne.jp/ma/colinp/gcc.html) and then the library >libmysqld.a with dlltool (<-- included with mingw) but to no avail: Dev-C++ >keeps spitting the same error (see below) log out when trying to compile >this new lib! >Anyone has an idea??? > > MinGW can link directly to most of the DLLs. If your lib is a DLL (and not a static lib), you can add it to your linker options like it was just another lib. Daniel K. O. |
|
From: Josep S. <sub...@ar...> - 2004-03-07 20:13:55
|
>>MinGW can link directly to most of the DLLs. If your lib is a DLL (and >>not a static lib), you can add it to your linker options like it was >>just another lib. By linking directly to libmysqld.dll instead of .a or .lib, the same errors occur! Thanks, Josep -----Ursprungliche Nachricht----- Von: dev...@li... [mailto:dev...@li...]Im Auftrag von Daniel K. O. Gesendet: Sonntag, 7. Marz 2004 17:23 An: Josep Subirana Cc: DEV-C++ Betreff: Re: [Dev-C++] Trying to link libmysqld.lib (Update) Josep Subirana wrote: >I have generated a libmysqld.def file with impdef( >http://webclub.kcom.ne.jp/ma/colinp/gcc.html) and then the library >libmysqld.a with dlltool (<-- included with mingw) but to no avail: Dev-C++ >keeps spitting the same error (see below) log out when trying to compile >this new lib! >Anyone has an idea??? > > MinGW can link directly to most of the DLLs. If your lib is a DLL (and not a static lib), you can add it to your linker options like it was just another lib. Daniel K. O. ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: <or...@vp...> - 2004-03-07 21:28:35
|
Josep Subirana wrote: > By linking directly to libmysqld.dll instead of .a or .lib, the same er= rors > occur! Could you create an archive of the lib, dll, def, .a, headers, sources=20 (actually everything required to compile your app), and put it up=20 somewhere, so I can download and experiment? If you cannot put it up anywhere, then send it to this address (as a=20 last resort): or...@di... -- Greetings, Bal=E1zs |