2017-10-25 2 views
0

Ich bekomme immer diese Nachricht. Ich benutze auch Windows, so dass es ein bisschen schwierig ist, den Befehl richtig zu bekommen.undefined Verweis auf mysql_get_client_info

undefined reference to `mysql_get_client_info‘

Von dem, was ich herausfinden kann, wenn ich es googeln bin ich nicht richtig verbinden. Also habe ich das versucht.

Kann ich bitte etwas Hilfe bekommen, was ich falsch mache?


Das hat nicht funktioniert. Habe ich es falsch gemacht?

$ gcc *.c -L"C:\Program Files\MySQL\MySQL Server 5.7\lib" -lmysqlclient 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
Warning: corrupt .drectve at end of def file 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x23): undefined reference to `[email protected][email protected]' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x23): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `[email protected][email protected]' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x2e): undefined reference to `[email protected]@@YAXXZ' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x2e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `[email protected]@@YAXXZ' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x61): undefined reference to `[email protected]@Z' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x61): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `[email protected]@Z' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x7d): undefined reference to `_CxxThrowException' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x7d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_CxxThrowException' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.xdata[[email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]]+0x10): undefined reference to `__CxxFrameHandler3' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.xdata[[email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]]+0x10): relocation truncated to fit: rva32 against undefined symbol `__CxxFrameHandler3' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.xdata[[email protected][email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@4HA]+0x8): undefined reference to `__CxxFrameHandler3' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.xdata[[email protected][email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@4HA]+0x8): relocation truncated to fit: rva32 against undefined symbol `__CxxFrameHandler3' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.xdata[[email protected][email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@4HA]+0xc): undefined reference to `__CxxFrameHandler3' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.xdata[[email protected][email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@4HA]+0xc): relocation truncated to fit: rva32 against undefined symbol `__CxxFrameHandler3' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.rdata[[email protected]@@[email protected]]+0x10): undefined reference to `_purecall' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.rdata[[email protected]@@[email protected]]+0x18): undefined reference to `_purecall' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.data$r+0x0): undefined reference to `[email protected]@[email protected]' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x15): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x15): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xed): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xed): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x99): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x99): additional relocation overflows omitted from the output 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xb): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x163): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x14a): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x17): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x257): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xa): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x2f7): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xb): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x1b7): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x11): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x2fb): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x10): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x72): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x10): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x17c): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x10): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x72): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x9): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x3f): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xf3): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x248): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xb7): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x121): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `__security_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xa8): undefined reference to `__security_check_cookie' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.xdata[$unwind$mysql_list_dbs]+0x10): undefined reference to `__GSHandlerCheck' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.xdata[$unwind$mysql_list_tables]+0x10): undefined reference to `__GSHandlerCheck' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.xdata[$unwind$mysql_list_fields]+0x10): undefined reference to `__GSHandlerCheck' 
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.xdata[$unwind$mysql_stmt_store_result]+0xc): undefined reference to `__GSHandlerCheck' 

Antwort

0

Sie müssen -lmysqlclient angeben, wenn Ihre Anwendung zu verknüpfen. Das Flag -L ändert nur den Bibliothekssuchpfad. Es verbindet sich nicht mit irgendwelchen Bibliothekaren.

+0

Das hat nicht funktioniert. – cokedude