List:General Discussion« Previous MessageNext Message »
From:Uri Even-Chen Date:March 2 2000 4:50pm
Subject:Re: help with MySQL setup
View as plain text  
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.


Tonu Samuel wrote:
> 
> Uri Even-Chen wrote:
> 
> > 1. I am a C++ programmer. I already installed mysql++, but I don't know
> > how to compile my program with it. I tried including the file
> > "/usr/local/include/mysql++/sqlplus.hh", and it makes my program to not
> > pass compilation (see below). which files should I include, and compile,
> > when I want to use mysql++?
> 
> This means, compiler can't find this file. You can fix this if you add
> "-I /usr/local/include/mysql++/" to compiler options. I do not know
> about your backgroud but usually this resides in file named "Makefile".
> 
> > 2. do I need to keep the directory from which I extracted
> > "mysql++-1.6.0.tar.gz" and installed mysql++? or can I erase it after
> > the installation?
> 
> You can delete if you have done "make install". You need library files
> and make install puts them in some more usual place.
> 
> --
> +----------------------------------------------------------------+
> | TcX  ____  __     _____   _____  ___                           |
> |     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Tõnu Samuel           |
> |    /*/ /*/ /*/   \*\_   |*|   |*||*|     tonu@stripped        |
> |   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Tallinn, Estonia      |
> |  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                       |
> |  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                      |
> |             /*/             \*\                Developers Team |
> +----------------------------------------------------------------+

-- 
--------------------------------------------------------
Uri Even-Chen
Speedy Software
Raanana, Israel.
E-mail: webmaster@stripped
ICQ Number: 7461268
Phone Number: 09-7715013
--------------------------------------------------------
Welcome to Speedy Net (In Hebrew):
   http://www.speedy.co.il/
Speedy Dating (In Hebrew):
   http://www.speedy.co.il/dating/
Speedy Composer (In English):
   http://www.speedy.co.il/composer/
--------------------------------------------------------
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