Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

how to compile and link

From: Albert Sanchez <ouferrat(at)gmail.com>
Date: Wed Jul 04 2007 - 08:59:47 EDT


Hello,

I'm new to MySQL++

I've just installed mysql++-2.3.0 in an Ubuntu Linux following the instructions in README.linux

I want to compile an example but I must be missing something... it doesn't work:

I have tried thinks like

g++ -I/LWGW/mysql/lib -I/usr/include/mysql/ -L /usr/lib/mysql -lmysqlclient_r simple1.cpp

And the answer is:

/tmp/cc4wpKdP.o: In function `main':
simple1.cpp:(.text+0xaf): undefined reference to
`mysqlpp::Connection::Connectio

n(bool)'
simple1.cpp:(.text+0xd5): undefined reference to `connect_to_db(int, char**, mys
qlpp::Connection&, char const*)'
simple1.cpp:(.text+0x103): undefined reference to
`mysqlpp::Connection::query()'

Do you need help?X

simple1.cpp:(.text+0x1ae): undefined reference to `mysqlpp::Row::at(unsigned int
) const'
simple1.cpp:(.text+0x1d9): undefined reference to
`mysqlpp::operator<<(std::basi

c_ostream<char, std::char_traits<char> >&, mysqlpp::ColData_Tmpl<mysqlpp::const_
string> const&)'

simple1.cpp:(.text+0x27e): undefined reference to `mysqlpp::Row::~Row()'
simple1.cpp:(.text+0x29a): undefined reference to `mysqlpp::Row::~Row()'
simple1.cpp:(.text+0x2bd): undefined reference to `mysqlpp::Row::~Row()'
simple1.cpp:(.text+0x2d9): undefined reference to `mysqlpp::Row::~Row()'
simple1.cpp:(.text+0x30b): undefined reference to `mysqlpp::Query::error()'
simple1.cpp:(.text+0x400): undefined reference to

`mysqlpp::Connection::~Connect

ion()'
simple1.cpp:(.text+0x422): undefined reference to
`mysqlpp::Connection::~Connect

ion()'

etc...

Can you help me please?

Thanks in advance

Albert Received on Wed Jul 4 09:00:04 2007

This archive was generated by hypermail 2.1.8 : Wed Jul 04 2007 - 09:10:02 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library