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/
--------------------------------------------------------