List:MySQL++« Previous MessageNext Message »
From:Vishal Kothari Date:August 17 2004 7:03pm
Subject:Re: Re: Statically compiling the API
View as plain text  
I tried that also but it gives me errors of undefined reference. I am pasting
the errors below:

--------------------------------------------------------
[root@linlabs sendmax]# make
g++ -o Mailer main.o connection.o transmitter.o log.o message.o sendMail.o
authenticate.o timer.o -Iinclude -I/usr/local/include -I/usr/include/mysql -w
-g -L. 
-lsqlpp
main.o(.gnu.linkonce.t._ZNK11MysqlResUse11fetch_fieldEv+0x10): In function
`MysqlResUse::fetch_field() const':
: undefined reference to `mysql_fetch_field'
main.o(.gnu.linkonce.t._ZN11MysqlResUse10field_seekEi+0x13): In function
`MysqlResUse::field_seek(int)':
: undefined reference to `mysql_field_seek'
main.o(.gnu.linkonce.t._ZNK11MysqlResUse10num_fieldsEv+0x10): In function
`MysqlResUse::num_fields() const':
: undefined reference to `mysql_num_fields'
message.o(.gnu.linkonce.t._ZNK8MysqlRes8num_rowsEv+0x13): In function
`MysqlRes::num_rows() const':
: undefined reference to `mysql_num_rows'
message.o(.gnu.linkonce.t._ZNK8MysqlRes9fetch_rowEv+0xe8): In function
`MysqlRes::fetch_row() const':
: undefined reference to `mysql_fetch_row'
--------------------------------------------------------

All my files compile fine. But it doesn't build the executable.

Regards,
Vishal Kothari.

> Vishal Kothari wrote:
> > 
> > But my problem isn't how to build that static version of the mysql c++ api 
> > but how do I statically link that libmysqlpp.a or libsqlplus.a file with my
> > application. 
> 
> With only the static library installed, you will have no choice but to 
> link statically.
> 
> 	gcc myprog.o -lmysqlpp -o myprog
> 
> Very simple.
> 
> -- 
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:   
> http://lists.mysql.com/plusplus?unsub=1
Thread
Re: Re: Statically compiling the APIVishal Kothari17 Aug
  • Re: Statically compiling the APIWarren Young17 Aug
Re: Re: Statically compiling the APIVishal Kothari17 Aug
  • Re: Statically compiling the APIWarren Young17 Aug