List:General Discussion« Previous MessageNext Message »
From:<sinisa Date:March 2 2000 5:01pm
Subject:Re: help with MySQL setup
View as plain text  
Uri Even-Chen writes:
 > MySQL license: #7259
 > MySQL basic email support: #489
 > -------------------------------
 > hi.
 > 
 > I have so many problems in compiling my programs with mysql++. I have
 > already installed mySQL and mysql++, but I didn't find information on
 > how to compile files with it. I keep getting compilation errors, even
 > after I added all the include library options -I, -L and -l. I'm not
 > using any Makefile, but I compile everything from a script. I even can't
 > compile your examples. my compilation command is (I tried every possible
 > option):
 > 
 > `/usr/bin/g++ -L/usr/lib/mysql -lmysqlclient -lmysql++ -I
 > /usr/local/include/mysql++/ -I /usr/include/mysql/  simple1.cc`
 > 
 > and the result is:
 > 
 > /tmp/cc6w86cv.o: In function `MysqlRes::data_seek(unsigned int) const':
 > /tmp/cc6w86cv.o(.MysqlRes::gnu.linkonce.t.data_seek(unsigned int)
 > const+0x11): undefined reference to `mysql_data_seek'
 > /tmp/cc6w86cv.o: In function `MysqlRes::fetch_row(void) const':
 > /tmp/cc6w86cv.o(.MysqlRes::gnu.linkonce.t.fetch_row(void) const+0x18):
 > undefined reference to `mysql_fetch_lengths'
 > /tmp/cc6w86cv.o(.MysqlRes::gnu.linkonce.t.fetch_row(void) const+0x28):
 > undefined reference to `mysql_fetch_row'
 > /usr/local/lib/libmysql++.so: undefined reference to
 > `mysql_store_result'
 > /usr/local/lib/libmysql++.so: undefined reference to `mysql_init'
 > /usr/local/lib/libmysql++.so: undefined reference to `mysql_connect'
 > /usr/local/lib/libmysql++.so: undefined reference to `mysql_shutdown'
 > /usr/local/lib/libmysql++.so: undefined reference to `mysql_refresh'
 > /usr/local/lib/libmysql++.so: undefined reference to `mysql_select_db'
 > /usr/local/lib/libmysql++.so: undefined reference to
 > `mysql_escape_string'
 > /usr/local/lib/libmysql++.so: undefined reference to `mysql_close'
 > /usr/local/lib/libmysql++.so: undefined reference to `mysql_fetch_field'
 > /usr/local/lib/libmysql++.so: undefined reference to `mysql_free_result'
 > /usr/local/lib/libmysql++.so: undefined reference to `mysql_use_result'
 > /usr/local/lib/libmysql++.so: undefined reference to `mysql_query'
 > /usr/local/lib/libmysql++.so: undefined reference to `mysql_field_seek'
 > collect2: ld returned 1 exit status
 > 
 > 
 > it's very frustrating, and I've been trying to solve this problem for
 > hours. I will appreciate your help.
 > 
 > Uri.

Hi!

All that you are missing  is -L pointing to the location where
libmysqlclient.a or .so is !!

That is all . 

Regards,

Sinisa

+----------------------------------------------------------------------+
| TcX  ____  __     _____   _____  ___     ==  mysql@stripped            |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic          |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@stripped     |
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus             |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                             |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                            |
|             /*/             \*\                Developers Team       |
+----------------------------------------------------------------------+
Thread
help with MySQL setupUri Even-Chen15 Feb
  • Re: help with MySQL setupsinisa15 Feb
    • Re: help with MySQL setupUri Even-Chen2 Mar
      • Re: help with MySQL setupsinisa3 Mar
    • still problems with mysql++Uri Even-Chen2 Mar
      • Re: still problems with mysql++Thimble Smith3 Mar
    • Re: help with MySQL setupTonu Samuel3 Mar
    • Re: still problems with mysql++Tonu Samuel3 Mar
    • Re: still problems with mysql++Uri Even-Chen3 Mar
    • Re: still problems with mysql++Tonu Samuel3 Mar
    • Re: another bug report with mysql++Uri Even-Chen5 Mar
      • Re: another bug report with mysql++sinisa5 Mar
        • Re: segmentation fault with mysql++Uri Even-Chen5 Mar
          • Re: segmentation fault with mysql++sinisa6 Mar
        • Re: segmentation fault with mysql++Uri Even-Chen7 Mar
          • Re: segmentation fault with mysql++Thimble Smith7 Mar
  • Re: help with MySQL setupUri Even-Chen1 Mar
  • Re: help with MySQL setupTonu Samuel1 Mar
  • Re: help with MySQL setupUri Even-Chen2 Mar
    • Re: help with MySQL setupsinisa2 Mar
    • Re: help with MySQL setupThimble Smith2 Mar
  • Re: help with MySQL setupUri Even-Chen2 Mar
    • Re: help with MySQL setupsinisa2 Mar