mysql - undefined reference til `mysql\_get\_client\_info '

Indlæg af Hanne Mølgaard Plasc

Problem



Jeg fortsætter med at få denne besked. Jeg bruger også Windows, så jeg har lidt problemer med at få kommandoen til højre.


undefined reference til `mysql\_get\_client\_info '


Fra hvad jeg kan finde ud af, når jeg google det, forbinder jeg ikke korrekt. Så jeg forsøgte dette.


gcc *.c -L"C:Program FilesMySQLMySQL Server 5.7lib"


Kan jeg gerne få hjælp til, hvad jeg gør forkert?





Det fungerede ikke. Gjorde jeg det forkert?


$ gcc *.c -L"C:Program FilesMySQLMySQL Server 5.7lib" -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 FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.text$x+0x23): undefined reference to `??2@YAPEAX\_K@Z'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.text$x+0x23): relocation truncated to fit: R\_X86\_64\_PC32 against undefined symbol `??2@YAPEAX\_K@Z'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.text$x+0x2e): undefined reference to `\_\_imp\_?\_Xbad\_alloc@std@@YAXXZ'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.text$x+0x2e): relocation truncated to fit: R\_X86\_64\_PC32 against undefined symbol `\_\_imp\_?\_Xbad\_alloc@std@@YAXXZ'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.text$x+0x61): undefined reference to `??3@YAXPEAX@Z'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.text$x+0x61): relocation truncated to fit: R\_X86\_64\_PC32 against undefined symbol `??3@YAXPEAX@Z'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.text$x+0x7d): undefined reference to `\_CxxThrowException'
C:Program FilesMySQLMySQL Server 5.7lib/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 FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.xdata[$unwind$?\_Copy@?$basic\_string@DU?$char\_traits@D@std@@V?$allocator@D@2@@std@@QEAAX\_K0@Z]+0x10): undefined reference to `\_\_CxxFrameHandler3'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.xdata[$unwind$?\_Copy@?$basic\_string@DU?$char\_traits@D@std@@V?$allocator@D@2@@std@@QEAAX\_K0@Z]+0x10): relocation truncated to fit: rva32 against undefined symbol `\_\_CxxFrameHandler3'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.xdata[$unwind$?catch$1@?0??\_Copy@?$basic\_string@DU?$char\_traits@D@std@@V?$allocator@D@2@@std@@QEAAX\_K0@Z@4HA]+0x8): undefined reference to `\_\_CxxFrameHandler3'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.xdata[$unwind$?catch$1@?0??\_Copy@?$basic\_string@DU?$char\_traits@D@std@@V?$allocator@D@2@@std@@QEAAX\_K0@Z@4HA]+0x8): relocation truncated to fit: rva32 against undefined symbol `\_\_CxxFrameHandler3'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.xdata[$unwind$?catch$0@?0??\_Copy@?$basic\_string@DU?$char\_traits@D@std@@V?$allocator@D@2@@std@@QEAAX\_K0@Z@4HA]+0xc): undefined reference to `\_\_CxxFrameHandler3'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.xdata[$unwind$?catch$0@?0??\_Copy@?$basic\_string@DU?$char\_traits@D@std@@V?$allocator@D@2@@std@@QEAAX\_K0@Z@4HA]+0xc): relocation truncated to fit: rva32 against undefined symbol `\_\_CxxFrameHandler3'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.rdata[??\_7error\_category@std@@6B@]+0x10): undefined reference to `\_purecall'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.rdata[??\_7error\_category@std@@6B@]+0x18): undefined reference to `\_purecall'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client\_authentication.obj):(.data$r+0x0): undefined reference to `??\_7type\_info@@6B@'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x15): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/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 FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xed): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/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 FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/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 FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x99): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x99): additional relocation overflows omitted from the output
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xb): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x163): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x14a): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x17): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x257): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xa): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x2f7): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xb): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x1b7): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x11): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x2fb): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x10): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x72): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x10): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x17c): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x10): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x72): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x9): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x3f): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xf3): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x248): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xb7): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x121): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `\_\_security\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xa8): undefined reference to `\_\_security\_check\_cookie'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.xdata[$unwind$mysql\_list\_dbs]+0x10): undefined reference to `\_\_GSHandlerCheck'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.xdata[$unwind$mysql\_list\_tables]+0x10): undefined reference to `\_\_GSHandlerCheck'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.xdata[$unwind$mysql\_list\_fields]+0x10): undefined reference to `\_\_GSHandlerCheck'
C:Program FilesMySQLMySQL Server 5.7lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.xdata[$unwind$mysql\_stmt\_store\_result]+0xc): undefined reference to `\_\_GSHandlerCheck'

Bedste reference


Du skal angive -lmysqlclient, når du knytter din ansøgning. Flag -L ændrer kun bibliotekets søgevej; det linker faktisk ikke til nogen biblioteker.