logo       

RE: Still undefined references: msg#00014

db.mysql.c++

Subject: RE: Still undefined references

Hi Reto,

In the end it turned out that the problem I had was with the way I compiled
my program. I had to manually link the mysql++ libraries when I compiled.

My compilation line looks like so:
c++ -I/usr/include/mysql -L/usr/local/lib/ -lsqlplus -o main main.cpp


Hope this helps.


> -----Original Message-----
> From: Reto Stalder [mailto:retstald@xxxxxxxxxx]
> Sent: 12 September 2002 05:02
> To: mysql++
> Subject: Still undefined references
>
>
> Hi,
>
> my MySQL++ installation does still not work. I've installed it the way
> Matthiew Leach and Denis Rampnoux have figured out last week.
> Most of the
> linker errors don't occur anymore, but there are still some.
> What library is
> missing? My C++ program looks like this:
>
> #include <iostream.h>
> #include <iomanip.h>
> #include <sqlplus.hh>
>
> int main(){
> return 0;
> }
>
> If I make "g++ main.cc -o main" I get the following errors:
>
> /tmp/ccPlQLcI.o(.rodata+0x120): undefined reference to
> `mysql_date type_info
> node'
> /tmp/ccPlQLcI.o(.rodata+0x158): undefined reference to
> `mysql_time type_info
> node'
> /tmp/ccPlQLcI.o: In function `MysqlDate type_info function':
> /tmp/ccPlQLcI.o(.gnu.linkonce.t.__tf9MysqlDate+0x18):
> undefined reference to
> `mysql_date type_info function'
> /tmp/ccPlQLcI.o: In function `MysqlTime type_info function':
> /tmp/ccPlQLcI.o(.gnu.linkonce.t.__tf9MysqlTime+0x18):
> undefined reference to
> `mysql_time type_info function'
> collect2: ld returned 1 exit status
>
> My system is a SuSE 7.1, kernel 2.2.18, gcc and g++ 2.95.2.
> Packages:
> - mysql 3.23.30-2
> - mysql-client 3.23.30-2
> - mysql-devel 3.23.30-2
> - mysql-shared 3.23.30-2
>
> Does somebody know how I might get it to work? Thank you very
> much for your
> help.
>
> Regards,
> Reto Stalder
>
> ------------------------------
> Visit us on WWW.VOLLEYTOTAL.CH
>
>



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise