I am quite new to programming in Linux although I am no stranger to
programming in Windows.
This is my problem:
I downloaded the mysql++ API and extracted it to /root/mysql++-1.7.9/
I browsed to /examples/ and thought I would try and compile simple1.cc. 
This is what I did from the terminal:

terminal #  g++ simple1.cc -I/usr/local/mysql/include/
-I/root/mysql++-1.7.9/sqlplusint/ 

/usr/local/mysql/ is where my MySQL 3.23.38 is installed
/root/mysql++-1.7.9/ is the extracted API files I downloaded from
mysql.com

All I get is gumph

pc-xx-34-111-118-du:~/mysql++-1.7.9/examples # g++ simple1.cc
-I/usr/local/mysql/include/ -I/root/mysql++-1.7.9/sqlplusint/
/tmp/ccrKLeaN.o: In function `main':
/tmp/ccrKLeaN.o(.text+0x30): undefined reference to
`MysqlConnection::MysqlConnection(char const *, char const *, char const
*, char const *, bool)'
/tmp/ccrKLeaN.o(.text+0x55b): undefined reference to `operator<<(ostream
&, mysql_ColData<const_string> const &)'
/tmp/ccrKLeaN.o(.text+0x6a2): undefined reference to
`MysqlConnection::~MysqlConnection(void)'
/tmp/ccrKLeaN.o(.text+0x80d): undefined reference to
`MysqlConnection::~MysqlConnection(void)'
/tmp/ccrKLeaN.o(.rodata+0x1ac): undefined reference to `mysql_date
type_info node'
/tmp/ccrKLeaN.o(.rodata+0x1e4): undefined reference to `mysql_time
type_info node'
/tmp/ccrKLeaN.o: In function `MysqlDate type_info function':
/tmp/ccrKLeaN.o(.gnu.linkonce.t.__tf9MysqlDate+0x18): undefined
reference to `mysql_date type_info function'
/tmp/ccrKLeaN.o: In function `MysqlTime type_info function':
/tmp/ccrKLeaN.o(.gnu.linkonce.t.__tf9MysqlTime+0x18): undefined
reference to `mysql_time type_info function'
/tmp/ccrKLeaN.o: In function `MysqlRes::~MysqlRes(void)':
/tmp/ccrKLeaN.o(.gnu.linkonce.t._._8MysqlRes+0x1b): undefined reference
to `MysqlResUse::~MysqlResUse(void)'
/tmp/ccrKLeaN.o: In function `MysqlQuery::preview(void)':
/tmp/ccrKLeaN.o(.MysqlQuery::gnu.linkonce.t.preview(void)+0x1b):
undefined reference to `SQLQuery::str(SQLQueryParms const &) const'
/tmp/ccrKLeaN.o: In function `MysqlRes::num_rows(void) const':
/tmp/ccrKLeaN.o(.MysqlRes::gnu.linkonce.t.num_rows(void) const+0x14):
undefined reference to `mysql_num_rows'
/tmp/ccrKLeaN.o: In function `MysqlQuery::store(SQLQueryParms &,
query_reset)':
/tmp/ccrKLeaN.o(.MysqlQuery::gnu.linkonce.t.store(SQLQueryParms &,
query_reset) +0x40): undefined reference to `SQLQuery::str(SQLQueryParms
const &, query_reset)'
/tmp/ccrKLeaN.o: In function
`MysqlFieldNames::MysqlFieldNames(MysqlResUse const *)':
/tmp/ccrKLeaN.o(.MysqlFieldNames::gnu.linkonce.t.(MysqlResUse const
*)+0x4d): undefined reference to `MysqlFieldNames::init(MysqlResUse
const *)'
/tmp/ccrKLeaN.o: In function `MysqlResUse::num_fields(void) const':
/tmp/ccrKLeaN.o(.MysqlResUse::gnu.linkonce.t.num_fields(void)
const+0x12): undefined reference to `mysql_num_fields'
/tmp/ccrKLeaN.o: In function `MysqlRes::fetch_row(void) const':
/tmp/ccrKLeaN.o(.MysqlRes::gnu.linkonce.t.fetch_row(void) const+0xd8):
undefined reference to `mysql_fetch_row'
/tmp/ccrKLeaN.o(.MysqlRes::gnu.linkonce.t.fetch_row(void) const+0xec):
undefined reference to `mysql_fetch_lengths'
/tmp/ccrKLeaN.o: In function `MysqlRes::data_seek(unsigned int) const':
/tmp/ccrKLeaN.o(.MysqlRes::gnu.linkonce.t.data_seek(unsigned int)
const+0x1c): undefined reference to `mysql_data_seek'
/tmp/ccrKLeaN.o: In function `MysqlConnection::store(basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> > const &)':
/tmp/ccrKLeaN.o(.MysqlConnection::gnu.linkonce.t.store(basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> > const
&)+0x1d): undefined reference to
`MysqlConnection::store(basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> > const &, bool)'
/tmp/ccrKLeaN.o: In function `FieldTypes::FieldTypes(MysqlResUse const
*)':
/tmp/ccrKLeaN.o(.FieldTypes::gnu.linkonce.t.(MysqlResUse const *)+0x4d):
undefined reference to `FieldTypes::init(MysqlResUse const *)'
collect2: ld returned 1 exit status
pc-62-31-190-118-du:~/mysql++-1.7.9/examples # g++ simple1.cc
-I/usr/local/mysql/include/ -I/root/mysql++-1.7.9/sqlplusint/
/tmp/ccbSuqTq.o: In function `main':
/tmp/ccbSuqTq.o(.text+0x30): undefined reference to
`MysqlConnection::MysqlConnection(char const *, char const *, char const
*, char const *, bool)'
/tmp/ccbSuqTq.o(.text+0x55b): undefined reference to `operator<<(ostream
&, mysql_ColData<const_string> const &)'
/tmp/ccbSuqTq.o(.text+0x6a2): undefined reference to
`MysqlConnection::~MysqlConnection(void)'
/tmp/ccbSuqTq.o(.text+0x80d): undefined reference to
`MysqlConnection::~MysqlConnection(void)'
/tmp/ccbSuqTq.o(.rodata+0x1ac): undefined reference to `mysql_date
type_info node'
/tmp/ccbSuqTq.o(.rodata+0x1e4): undefined reference to `mysql_time
type_info node'
/tmp/ccbSuqTq.o: In function `MysqlDate type_info function':
/tmp/ccbSuqTq.o(.gnu.linkonce.t.__tf9MysqlDate+0x18): undefined
reference to `mysql_date type_info function'
/tmp/ccbSuqTq.o: In function `MysqlTime type_info function':
/tmp/ccbSuqTq.o(.gnu.linkonce.t.__tf9MysqlTime+0x18): undefined
reference to `mysql_time type_info function'
/tmp/ccbSuqTq.o: In function `MysqlRes::~MysqlRes(void)':
/tmp/ccbSuqTq.o(.gnu.linkonce.t._._8MysqlRes+0x1b): undefined reference
to `MysqlResUse::~MysqlResUse(void)'
/tmp/ccbSuqTq.o: In function `MysqlQuery::preview(void)':
/tmp/ccbSuqTq.o(.MysqlQuery::gnu.linkonce.t.preview(void)+0x1b):
undefined reference to `SQLQuery::str(SQLQueryParms const &) const'
/tmp/ccbSuqTq.o: In function `MysqlRes::num_rows(void) const':
/tmp/ccbSuqTq.o(.MysqlRes::gnu.linkonce.t.num_rows(void) const+0x14):
undefined reference to `mysql_num_rows'
/tmp/ccbSuqTq.o: In function `MysqlQuery::store(SQLQueryParms &,
query_reset)':
/tmp/ccbSuqTq.o(.MysqlQuery::gnu.linkonce.t.store(SQLQueryParms &,
query_reset) +0x40): undefined reference to `SQLQuery::str(SQLQueryParms
const &, query_reset)'
/tmp/ccbSuqTq.o: In function
`MysqlFieldNames::MysqlFieldNames(MysqlResUse const *)':
/tmp/ccbSuqTq.o(.MysqlFieldNames::gnu.linkonce.t.(MysqlResUse const
*)+0x4d): undefined reference to `MysqlFieldNames::init(MysqlResUse
const *)'
/tmp/ccbSuqTq.o: In function `MysqlResUse::num_fields(void) const':
/tmp/ccbSuqTq.o(.MysqlResUse::gnu.linkonce.t.num_fields(void)
const+0x12): undefined reference to `mysql_num_fields'
/tmp/ccbSuqTq.o: In function `MysqlRes::fetch_row(void) const':
/tmp/ccbSuqTq.o(.MysqlRes::gnu.linkonce.t.fetch_row(void) const+0xd8):
undefined reference to `mysql_fetch_row'
/tmp/ccbSuqTq.o(.MysqlRes::gnu.linkonce.t.fetch_row(void) const+0xec):
undefined reference to `mysql_fetch_lengths'
/tmp/ccbSuqTq.o: In function `MysqlRes::data_seek(unsigned int) const':
/tmp/ccbSuqTq.o(.MysqlRes::gnu.linkonce.t.data_seek(unsigned int)
const+0x1c): undefined reference to `mysql_data_seek'
/tmp/ccbSuqTq.o: In function `MysqlConnection::store(basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> > const &)':
/tmp/ccbSuqTq.o(.MysqlConnection::gnu.linkonce.t.store(basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> > const
&)+0x1d): undefined reference to
`MysqlConnection::store(basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> > const &, bool)'
/tmp/ccbSuqTq.o: In function `FieldTypes::FieldTypes(MysqlResUse const
*)':
/tmp/ccbSuqTq.o(.FieldTypes::gnu.linkonce.t.(MysqlResUse const *)+0x4d):
undefined reference to `FieldTypes::init(MysqlResUse const *)'
collect2: ld returned 1 exit status   




What am I doing wrong?  PLEASE any ideas!!

I am using Suse Linux 7.1 professional with kernel 2.4.

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to