dbTalk Databases Forums  

Compilation, Linking error for MySQL++ tutorials

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Compilation, Linking error for MySQL++ tutorials in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Willy K'
 
Posts: n/a

Default Compilation, Linking error for MySQL++ tutorials - 04-04-2005 , 12:13 AM






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

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: Compilation, Linking error for MySQL++ tutorials - 04-04-2005 , 02:13 PM






Willy K' wrote:

Quote:
in /usr/local/mysql++1.7.30/examples/
I've ran "./make"
And then what happens?

Quote:
I've tried "g++ resetdb.cpp -lmysqlpp" infinite times, this is
You also need to build util.cpp. Instead of trying to run g++ by hand,
I recommend using examples/Makefile.simple to build the examples if you
want to avoid using the automake mechanism:

$ make -f Makefile.simple

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Warren Young
 
Posts: n/a

Default Re: Compilation, Linking error for MySQL++ tutorials - 04-05-2005 , 07:22 AM



Willy K' wrote:

Quote:
When running "make" in "/usr/local/mysql++1.7.30/examples/"
this is the following output
"make: Nothing to be done for `all'."

-------------------------------------------------------------

When running "make -f Makefile.simple"

make: Nothing to be done for `all'.

-------------------------------------------------------------

What's wrong??
Not a thing. It is telling you that it has built the programs. Enjoy
them. And go read a make manual for heaven's sake!

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.