Dear all,
am new to MySQL++ and also Linux
I now have a problem of g++~ing resetdb.cpp provide in the
/usr/local/mysql++1.7.30/examples/
I have seen various post about it, and try it all, but still
can't get it done.
Here's what I've done
---------------------------------------------------
In file ld.so.conf
/usr/lib/mysql
/usr/local/lib
/usr/local/mysql++-1.7.30/lib
/usr/lib
AND ran "ldconfig"
---------------------------------------------------
in /usr/local/mysql++1.7.30/examples/
I've ran "./make"
---------------------------------------------------
I've tried "g++ resetdb.cpp -lmysqlpp" infinite times, this is
what it returns
-------------------------------------------------------
OUTPUT
[root@localhost examples-gcc]# g++ resetdb.cpp -lmysqlpp
/tmp/ccQjmiyQ.o(.text+0x144): In function `main':
: undefined reference to `connect_to_db(int, char**,
mysqlpp::Connection&, char const*)'
/tmp/ccQjmiyQ.o(.text+0x17c): In function `main':
: undefined reference to `kpcSampleDatabase'
/tmp/ccQjmiyQ.o(.text+0x1e6): In function `main':
: undefined reference to `kpcSampleDatabase'
/tmp/ccQjmiyQ.o(.text+0x30a): In function `main':
: undefined reference to `kpcSampleDatabase'
collect2: ld returned 1 exit status
---------------------------------------------------------
I have saw a post before having the similar problem, that user
re-make mysql++ and it worked,
Well, I sort of did that too, but after "./configure
--with-mysql=/usr/local/mysql-max-4.1.10-pc-linux-gnu-i686",
"make", "make install", but the problem still exist!!!
Please advise!!!
Willy Kwong @HK