List:MySQL++« Previous MessageNext Message »
From:Ramon Hernandez Date:July 27 2000 12:47pm
Subject:NEWBIE ALERT: Having trouble compiling plusplus programs
View as plain text  
Dear All,
    Yesterday I installed all of the latest MySQL rpms under RedHat 6.1. I
try to compile programs, and they compile fine, but when the linking step
happens I get errors. I've tried everything I can think of, but to no avail.
My info is below. Thanks for your time.
--Ray
 
Makefile
---------------------------------
all:    dbpop
 
dbpop:  dbpop.o sestring.o
        g++ -o dbpop dbpop.o sestring.o -L/usr/local/lib
 
dbpop.o:        dbpop.cpp
        g++ -c dbpop.cpp -I/usr/local/include/mysql++ -I/usr/include/mysql
sestring.o:     sestring.cpp
        g++ -c sestring.cpp
clean:
        rm -irf *.o
 
Error
---------------------------------
g++ -c dbpop.cpp -I/usr/local/include/mysql++ -I/usr/include/mysql
g++ -c sestring.cpp
g++ -o dbpop dbpop.o sestring.o -L/usr/local/lib
dbpop.o(.rodata+0xf4): undefined reference to `mysql_date type_info node'
dbpop.o(.rodata+0x12c): undefined reference to `mysql_time type_info node'
dbpop.o: In function `MysqlDate type_info function':
dbpop.o(.gnu.linkonce.t.__tf9MysqlDate+0x18): undefined reference to
`mysql_date
 type_info function'
dbpop.o: In function `MysqlTime type_info function':
dbpop.o(.gnu.linkonce.t.__tf9MysqlTime+0x18): undefined reference to
`mysql_time
 type_info function'
collect2: ld returned 1 exit status
make: *** [dbpop] Error 1
 

Thread
NEWBIE ALERT: Having trouble compiling plusplus programsRamon Hernandez27 Jul