List:MySQL++« Previous MessageNext Message »
From:Dovid Kopel Date:November 10 2004 1:28pm
Subject:Re: Can't run examples by themselves
View as plain text  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris-

I unemerge and remerged there is one instance of the headers. I'm confused.

munky@lappy ~/examples $ g++ -I/usr/include/mysql -I/usr/include/mysql++
- -o simple simple1.cc
/tmp/cc0ZhRu5.o(.text+0x3a): In function `main':
: undefined reference to `connect_sample_db(int, char**,
mysqlpp::Connection&, char const*)'
/tmp/cc0ZhRu5.o(.text+0x4d): In function `main':
: undefined reference to `mysqlpp::Connection::query()'
/tmp/cc0ZhRu5.o(.text+0x346): In function `main':
: undefined reference to `vtable for mysqlpp::Row'
/tmp/cc0ZhRu5.o(.text+0x370): In function `main':
: undefined reference to `vtable for mysqlpp::Row'
/tmp/cc0ZhRu5.o(.text+0x3b2): In function `main':
: undefined reference to `mysqlpp::Row::lookup_by_name(char const*) const'
/tmp/cc0ZhRu5.o(.text+0x3ea): In function `main':
: undefined reference to `vtable for mysqlpp::Row'
/tmp/cc0ZhRu5.o(.text+0x429): In function `main':
: undefined reference to `vtable for mysqlpp::Row'
/tmp/cc0ZhRu5.o(.text+0x4d8): In function `main':
: undefined reference to `mysqlpp::operator<<(std::basic_ostream<char,
std::char_traits<char> >&, mysqlpp::ColData_Tmpl<mysqlpp::const_string>
const&)'
/tmp/cc0ZhRu5.o(.text+0x760): In function `main':
: undefined reference to `mysqlpp::Connection::~Connection()'
/tmp/cc0ZhRu5.o(.text+0x77c): In function `main':
: undefined reference to `mysqlpp::Connection::~Connection()'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZN7mysqlpp3RowC1Ev+0x28): In function
`mysqlpp::Row::Row()':
: undefined reference to `vtable for mysqlpp::Row'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZN7mysqlpp3RowC1Ev+0x3c): In function
`mysqlpp::Row::Row()':
: undefined reference to `vtable for mysqlpp::Row'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZN7mysqlpp3RowD1Ev+0x12): In function
`mysqlpp::Row::~Row()':
: undefined reference to `vtable for mysqlpp::Row'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZN7mysqlpp3RowD1Ev+0x26): In function
`mysqlpp::Row::~Row()':
: undefined reference to `vtable for mysqlpp::Row'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZN7mysqlpp6ResultD1Ev+0x25): In
function `mysqlpp::Result::~Result()':
: undefined reference to `mysqlpp::ResUse::~ResUse()'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZN7mysqlpp5Query7previewEv+0x23): In
function `mysqlpp::Query::preview()':
: undefined reference to `mysqlpp::SQLQuery::str(mysqlpp::SQLQueryParms&)'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZN7mysqlpp5Query5storeENS_11query_resetE+0x29):
In function `mysqlpp::Query::store(mysqlpp::query_reset)':
: undefined reference to `mysqlpp::Query::store(mysqlpp::SQLQueryParms&,
mysqlpp::query_reset)'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZN7mysqlpp10ConnectionC1Eb+0x44): In
function `mysqlpp::Connection::Connection(bool)':
: undefined reference to `mysql_init'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZN7mysqlpp6ResultD0Ev+0x25): In
function `mysqlpp::Result::~Result()':
: undefined reference to `mysqlpp::ResUse::~ResUse()'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZNK7mysqlpp6Result8num_rowsEv+0x27): In
function `mysqlpp::Result::num_rows() const':
: undefined reference to `mysql_num_rows'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZNK7mysqlpp6Result9fetch_rowEv+0x98):
In function `mysqlpp::Result::fetch_row() const':
: undefined reference to `mysql_fetch_row'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZNK7mysqlpp6Result9fetch_rowEv+0xad):
In function `mysqlpp::Result::fetch_row() const':
: undefined reference to `mysql_fetch_lengths'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZNK7mysqlpp6Result9data_seekEj+0x1f):
In function `mysqlpp::Result::data_seek(unsigned int) const':
: undefined reference to `mysql_data_seek'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZN7mysqlpp3RowC1EPPcPKNS_6ResUseEPjb+0x3d):
In function `mysqlpp::Row::Row(char**, mysqlpp::ResUse const*, unsigned
int*, bool)':
: undefined reference to `vtable for mysqlpp::Row'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZN7mysqlpp3RowC1EPPcPKNS_6ResUseEPjb+0x51):
In function `mysqlpp::Row::Row(char**, mysqlpp::ResUse const*, unsigned
int*, bool)':
: undefined reference to `vtable for mysqlpp::Row'
/tmp/cc0ZhRu5.o(.gnu.linkonce.t._ZN7mysqlpp3RowC1EPPcPKNS_6ResUseEPjb+0x16b):
In function `mysqlpp::Row::Row(char**,mysqlpp::ResUse const*, unsigned
int*, bool)':
: undefined reference to `mysqlpp::Row::size() const'
collect2: ld returned 1 exit status

- -=mUnky=-
- -Dovid Kopel
(516)-655-0489
munky@stripped
http://www.munkys.com


Chris Frey wrote:
| On Tue, Nov 09, 2004 at 11:13:47PM +0000, Dovid Kopel wrote:
|
|>-----BEGIN PGP SIGNED MESSAGE-----
|>Hash: SHA1
|>
|>I realized I can't compile the examples by themselves...I tried
|>compiling simple1.cc and got this:
|>
|>munky@lappy ~/examples $ g++ -o simple simple1.cc
|>In file included from /usr/local/include/mysql++.h:3,
|>~                 from util.h:4,
|>~                 from simple1.cc:1:
|>/usr/local/include/defs.h:6:19: mysql.h: No such file or directory
|
|
| Check to make sure you don't have a duplicate installed under /usr/local
| It should be under /usr/include/mysql++ if you emerged it, and you will
| need to use -I/usr/include/mysql++ on your command line.
|
| 	g++ -I/usr/include/mysql -I/usr/include/mysql++ -o simple simple1.cc
|
| That's the style of command I use, for the mysql C headers and the mysql++
| C++ headers.
|
| - Chris
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBkheECecRKprSbsERAqTnAJ9HFW2x6C+xJXgqft7VlNPPZd3fnQCffwWJ
c11XWUqYSmI4QVfRXjBePqU=
=x0/Z
-----END PGP SIGNATURE-----

Thread
Can't run examples by themselvesDovid Kopel10 Nov
  • Re: Can't run examples by themselvesChris Frey10 Nov
    • Re: Can't run examples by themselvesDovid Kopel10 Nov
      • Re: Can't run examples by themselvesChris Frey10 Nov
        • Re: Can't run examples by themselvesBryan W. Headley10 Nov
          • Re: Can't run examples by themselvesDovid Kopel10 Nov
            • Re: Can't run examples by themselvesWarren Young10 Nov
    • Re: Can't run examples by themselvesWarren Young10 Nov