List:MySQL++« Previous MessageNext Message »
From:Frank Mao Date:March 20 2005 8:52am
Subject:MySQL++ Link error
View as plain text  
I compile MySQL++ V1.7.32 sample "simple1.cpp" with dev-C++ on win XP.
I use include file and lib file in MySQL for unix. And I compile MySQL++
         source into libmysqlpp.a
please attached project file for dev-C++
When Compile project "simple1" , error is :

C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x120):connection.cpp:
undefined reference to `mysql_init@4'

C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x14a):connection.cpp:
undefined reference to `mysql_init@4'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x191):connection.cpp:
undefined reference to `mysql_init@4'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x1d7):connection.cpp:
undefined reference to `mysql_init@4'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x242):connection.cpp:
undefined reference to `mysql_init@4'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x4b6):connection.cpp:
more undefined references to `mysql_init@4' follow
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0xc36):connection.cpp:
undefined reference to `mysql_options@12'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0xc78):connection.cpp:
undefined reference to `mysql_real_connect@32'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0xeb8):connection.cpp:
undefined reference to `mysql_close@4'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0xed2):connection.cpp:
undefined reference to `mysql_close@4'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0xf2c):connection.cpp:
undefined reference to `mysql_select_db@8'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x111d):connection.cpp:
undefined reference to `mysql_refresh@8'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x130d):connection.cpp:
undefined reference to `mysql_shutdown@8'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x150f):connection.cpp:
undefined reference to `mysql_options@12'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x1554):connection.cpp:
undefined reference to `mysql_real_connect@32'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x17ac):connection.cpp:
undefined reference to `mysql_info@4'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x1a21):connection.cpp:
undefined reference to `mysql_query@8'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x1c82):connection.cpp:
undefined reference to `mysql_query@8'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x1ff7):connection.cpp:
undefined reference to `mysql_query@8'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x2025):connection.cpp:
undefined reference to `mysql_store_result@4'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x2401):connection.cpp:
undefined reference to `mysql_query@8'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text+0x242f):connection.cpp:
undefined reference to `mysql_use_result@4'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text$_ZN7mysqlpp10Connection5errorEv[mysqlpp::Connection::error()]+0x10):connection.cpp:






undefined reference to `mysql_error@4'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text$_ZNK7mysqlpp6Result9fetch_rowEv[mysqlpp::Result::fetch_row()






const]+0x1a1):connection.cpp: undefined reference to `mysql_fetch_row@4'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text$_ZNK7mysqlpp6Result9fetch_rowEv[mysqlpp::Result::fetch_row()






const]+0x1b8):connection.cpp: undefined reference to `mysql_fetch_lengths@4'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text$_ZNK7mysqlpp6Result9data_seekEj[mysqlpp::Result::data_seek(unsigned






int) const]+0x23):connection.cpp: undefined reference to
`mysql_data_seek@12'
C:/mysql++/lib/libmysqlpp.a(connection.o)(.text$_ZNK7mysqlpp6Result8num_rowsEv[mysqlpp::Result::num_rows()






const]+0x1f):connection.cpp: undefined reference to `mysql_num_rows@4'
C:/mysql++/lib/libmysqlpp.a(fields.o)(.text$_ZNK7mysqlpp6ResUse10num_fieldsEv[mysqlpp::ResUse::num_fields()






const]+0x10):fields.cpp: undefined reference to `mysql_num_fields@4'
C:/mysql++/lib/libmysqlpp.a(fields.o)(.text$_ZNK7mysqlpp6ResUse11fetch_fieldEv[mysqlpp::ResUse::fetch_field()






const]+0x10):fields.cpp: undefined reference to `mysql_fetch_field@4'
C:/mysql++/lib/libmysqlpp.a(fields.o)(.text$_ZN7mysqlpp6ResUse10field_seekEi[mysqlpp::ResUse::field_seek(int)]+0x17):fields.cpp:






undefined reference to `mysql_field_seek@8'
C:/mysql++/lib/libmysqlpp.a(result.o)(.text$_ZN7mysqlpp10Connection13affected_rowsEv[mysqlpp::Connection::affected_rows()]+0x10):result.cpp:






undefined reference to `mysql_affected_rows@4'
C:/mysql++/lib/libmysqlpp.a(result.o)(.text$_ZN7mysqlpp10Connection9insert_idEv[mysqlpp::Connection::insert_id()]+0x10):result.cpp:






undefined reference to `mysql_insert_id@4'
C:/mysql++/lib/libmysqlpp.a(result.o)(.text$_ZN7mysqlpp6ResUse5purgeEv[mysqlpp::ResUse::purge()]+0x19):result.cpp:






undefined reference to `mysql_free_result@4'






[Project]
FileName=mysql++.dev
Name=mysql++
UnitCount=48
Type=2
Ver=1
ObjFiles=
Includes=C:\mysql\include;C:\mysql++\lib
Libs=C:\mysql\lib\debug
PrivateResource=
ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker=
IsCpp=1
Icon=
ExeOutput=..\lib
ObjectOutput=..\lib\obj
OverrideOutput=0
OverrideOutputName=mysql++.a
HostApplication=
Folders=Headfile,Source
CommandLine=
UseCustomMakefile=0
CustomMakefile=
IncludeVersionInfo=0
SupportXPThemes=0
CompilerSet=0
CompilerSettings=0000000000000000000000

[Unit1]
FileName=coldata.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit2]
FileName=connection.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit3]
FileName=datetime.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit4]
FileName=field_names.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit5]
FileName=field_types.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit6]
FileName=fields.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit7]
FileName=manip.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit8]
FileName=myset.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit9]
FileName=query.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit10]
FileName=result.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit11]
FileName=row.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit12]
FileName=sql_query.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit13]
FileName=sql_string.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit14]
FileName=string_util.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit15]
FileName=type_info.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit16]
FileName=vallist.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[VersionInfo]
Major=0
Minor=1
Release=1
Build=1
LanguageID=1033
CharsetID=1252
CompanyName=
FileVersion=
FileDescription=Developed using the Dev-C++ IDE
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=
AutoIncBuildNr=0

[Unit17]
FileName=bad_query.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit18]
FileName=coldata.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit19]
FileName=compare.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit20]
FileName=connection.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit21]
FileName=const_string.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit22]
FileName=convert.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit23]
FileName=custom.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit24]
FileName=custom-macros.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit25]
FileName=datetime.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit26]
FileName=defs.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit27]
FileName=exceptions.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit28]
FileName=field_names.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit29]
FileName=field_types.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit30]
FileName=fields.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit31]
FileName=manip.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit32]
FileName=myset.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit33]
FileName=mysql++.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit34]
FileName=mysql++.hh
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit35]
FileName=null.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit36]
FileName=platform.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit37]
FileName=query.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit38]
FileName=resiter.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit39]
FileName=result.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit40]
FileName=row.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit41]
FileName=sql_query.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit42]
FileName=sql_string.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit43]
FileName=sqlplus.hh
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit44]
FileName=stream2string.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit45]
FileName=string_util.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit46]
FileName=tiny_int.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit47]
FileName=type_info.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit48]
FileName=vallist.h
CompileCpp=1
Folder=Headfile
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Project]
FileName=simple1.dev
Name=simple1
UnitCount=1
Type=1
Ver=1
ObjFiles=
Includes=C:\mysql++\lib;C:\mysql\gcc\include
Libs=C:\mysql++\lib;C:\mysql\gcc\lib
PrivateResource=
ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=-c -O2 -g_@@_-DWIN32 -D_DEBUG_@@_
Linker=-lmysqlpp -lwsock32_@@_-ldbug_@@_-lmygcc_@@_-lmysqlclient_@@_-lmysqlclient_r_@@_-lmysqld_@@_-lmystrings_@@_-lmysys_@@_
IsCpp=1
Icon=
ExeOutput=..\examples\debug
ObjectOutput=..\examples\obj
OverrideOutput=0
OverrideOutputName=simple1.exe
HostApplication=
Folders=
CommandLine=
UseCustomMakefile=0
CustomMakefile=
IncludeVersionInfo=0
SupportXPThemes=0
CompilerSet=0
CompilerSettings=0000000000000000000000

[Unit2]
FileName=simple1.cpp
CompileCpp=1
Folder=simple1
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[VersionInfo]
Major=0
Minor=1
Release=1
Build=1
LanguageID=1033
CharsetID=1252
CompanyName=
FileVersion=
FileDescription=Developed using the Dev-C++ IDE
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=
AutoIncBuildNr=0

[Unit1]
FileName=simple1.cpp
CompileCpp=1
Folder=simple1
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

Thread
MySQL++ Link errorFrank Mao20 Mar
  • Re: MySQL++ Link errorWarren Young22 Mar
    • Re: MySQL++ Link errorjmmail23 Mar