3 messages in com.mysql.lists.plusplusRE: help with this error (using g++)
FromSent OnAttachments
Esteban Kemp21 Jun 2003 23:26 
M. Bader23 Jun 2003 01:19 
Sinisa Milivojevic23 Jun 2003 04:21 
Subject:RE: help with this error (using g++)
From:M. Bader (news@one-mb.de)
Date:06/23/2003 01:19:34 AM
List:com.mysql.lists.plusplus

-----Original Message----- From: Esteban Kemp [mailto:eke@hotmail.com]

g++ -Wno-deprecated -I/usr/include/sqlplus -I/usr/include/mysql -I/usr/include -L/usr/lib $1.cc -o $2

see below

I get this error:

/tmp/ccjscjJl.o(.text+0x30): In function `main': : referencia a `MysqlConnection::~MysqlConnection [in-charge]()' not defined /tmp/ccjscjJl.o(.gnu.linkonce.t._ZN15MysqlConnectionC1Ev+0x21): In function `MysqlConnection::MysqlConnection[in-charge]()':: referencia a `mysql_init' not defined

^^^^^^ these are linker errors

you allready tell the linker where to find your libs (-L ....), but you should also tell him which lib you want to use by -l.... (strip off lib____.so => libsqlplus.so => -lsqlplus)

g++ -Wno-deprecated -I/usr/include/sqlplus -I/usr/include/mysql -I/usr/include -L/usr/lib $1.cc -o $2 -lsqlplus ^^^^^^^^^^