2017-10-25 17 views
0

私はこのメッセージを受け取り続けます。私はまた、コマンドを正しく取得するのに少し問題があるので、ウィンドウを使用しています。 `mysql_get_client_info」私は私が私が正しくリンクするわけではない、それをグーグルとき見つけ出すことができるものから、mysql_get_client_infoへの未定義の参照

未定義参照。だから私はこれを試した。

gcc *.c -L"C:\Program Files\MySQL\MySQL Server 5.7\lib" 

私が間違っていることについて助けてもらえますか?


これは機能しませんでした。私はそれを間違っていたのですか?

$ 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]@QEA[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' 

答えて

0

アプリケーションをリンクするときは、-lmysqlclientを指定する必要があります。 -Lフラグは、ライブラリの検索パスのみを変更します。実際には図書館員とリンクしていません。

+0

これは機能しませんでした。 – cokedude

関連する問題