undefined reference error while compiling mysql++ program

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi

I've got a little problem while compiling a program including the mysql++ features.

the code is meant to connect to a mysql server and grab some data.
Im sure the code is correct.
so I've asked in the mysql++ mailing list and they send me here..

I've got the following error:

[root@localhost mysql]# c++ -o mysqltest -I /usr/include/mysql -I /usr/include/mysql++/ mysqltest.cpp
mysqltest.cpp:87:2: warning: no newline at end of file
/tmp/cccorcbb.o(.text+0x7b): In function `main':
mysqltest.cpp: undefined reference to `mysqlpp::Connection::Connection(bool)' /tmp/cccorcbb.o(.text+0xab):mysqltest.cpp: undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int, char, unsigned int, char const*, unsigned int)' /tmp/cccorcbb.o(.text+0xc4):mysqltest.cpp: undefined reference to `mysqlpp::Connection::query()' /tmp/cccorcbb.o(.text+0x180):mysqltest.cpp: undefined reference to `mysqlpp::Row::operator[](char const*) const' /tmp/cccorcbb.o(.text+0x1b8):mysqltest.cpp: undefined reference to `mysqlpp::Row::operator[](char const*) const' /tmp/cccorcbb.o(.text+0x1fa):mysqltest.cpp: undefined reference to `mysqlpp::operator<<(std::basic_ostream<char, std::char_traits<char> >&, mysqlpp::ColData_Tmpl<mysqlpp::const_string> const&)' /tmp/cccorcbb.o(.text+0x22c):mysqltest.cpp: undefined reference to `mysqlpp::operator<<(std::basic_ostream<char, std::char_traits<char> >&, mysqlpp::ColData_Tmpl<mysqlpp::const_string> const&)' /tmp/cccorcbb.o(.text+0x2f8):mysqltest.cpp: undefined reference to `mysqlpp::Row::~Row()' /tmp/cccorcbb.o(.text+0x315):mysqltest.cpp: undefined reference to `mysqlpp::Row::~Row()' /tmp/cccorcbb.o(.text+0x354):mysqltest.cpp: undefined reference to `mysqlpp::Row::~Row()' /tmp/cccorcbb.o(.text+0x371):mysqltest.cpp: undefined reference to `mysqlpp::Row::~Row()' /tmp/cccorcbb.o(.text+0x3a3):mysqltest.cpp: undefined reference to `mysqlpp::Query::error()' /tmp/cccorcbb.o(.text+0x439):mysqltest.cpp: undefined reference to `mysqlpp::ResUse::~ResUse()' /tmp/cccorcbb.o(.text+0x453):mysqltest.cpp: undefined reference to `mysqlpp::ResUse::~ResUse()' /tmp/cccorcbb.o(.text+0x49f):mysqltest.cpp: undefined reference to `mysqlpp::Connection::~Connection()' /tmp/cccorcbb.o(.text+0x4cb):mysqltest.cpp: undefined reference to `mysqlpp::Connection::~Connection()'


I dont know hot to fix it, because as is said before the code is correct.
I would be thankfull if you has any hints or mailing lists where I could ask.

thx

J. Jurczok

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux