Tiwonge Nathan Kawonga writes:
> Hi all;
> When I run the example in its original directory, I have no problems.
> When I wrap the example in my source, the source compiles but fail to
> link with a certain Library as shown in the output below. What I want is
> to get out the query results and use them in normal C++ environment.
> Your help will be greatly appreciated. I am using linux Redhad version
> 6.2
> and mysql++ version 1.7.8
>
> Thanx in advance
> Tiwonge
>
> This is my compiler output
>
Hi!
First of all, please use version 1.7.9 which is already out.
> g++ -W -Wall -Wpointer-arith -pipe -D_POSIX_THREADS
> -D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT -DACE_HAS_AIO_CALLS -O3 -g
> -Wno-uninitialized -fno-implicit-templates
> -I/home/ACE/ACE_wrappers/TAO/orbsvcs -I/home/ACE/ACE_wrappers/TAO
> -I/usr/include/mysql -I/home/tiwonge/broker/broker_idl
> -I/home/tiwonge/retailer/implementation_TAO/Utils -I/usr/include/mysql
> -I/usr/local/mysql++/sqlplusint/.libs -I/usr/local/mysql++/sqlplusint
> -I/usr/lib/mysql/include -I/home/ACE/ACE_wrappers
> -DACE_HAS_EXCEPTIONS -L/home/ACE/ACE_wrappers/TAO/orbsvcs/orbsvcs
> -L/home/ACE/ACE_wrappers/TAO/tao -L/usr/lib/mysql/lib -L./../broker_idl
> -L/home/tiwonge/retailer/implementation_TAO/Utils -L/usr/lib/mysql
> -L/home/ACE/ACE_wrappers/ace -L./ -o supplierServer
> .obj/supplierServer.o libsupplier.a -lTAO_CosTrading -lTAO_CosNaming
> -lTAO_DynamicAny -lTAO_PortableServer -lTAO -lz -lmysqlclient
> -lsupplier_idl -lsqlplus -lTINAUtils -lACE -ldl -lpthread -lrt
> libsupplier.a(i_QueryDb_i.o): In function
> `i_QueryDb_i::getMessage(short, char const *, supplier::logInInfo const
> &, supplier::messageInfo_out)':
> /usr/local/mysql++/sqlplusint/connection1.hh:120: undefined reference to
> `void MysqlConnection::storein_sequence<vector<stock,
> __default_alloc_template<true, 0> > >(vector<stock,
> __default_alloc_template<true, 0> > &, basic_string<char,
> string_char_traits<char>, __default_alloc_template<true, 0> > const &)'
> collect2: ld returned 1 exit status
> make: *** [supplierServer] Error 1
>
What is your compiler version ??
Try compiling without -Wno-uninitialized -fno-implicit-templates.
The above method is a part of MySQL++ library and yet we did not have
reports of such problems.
You should also check that your linker finds libsqlplus library and
that it si located in some of the directories pointed out by -L statements.
Regards,
Sinisa
____ __ _____ _____ ___ == MySQL AB
/*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED]
/*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaca, Cyprus
/*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____
^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
/*/ \*\ Developers Team
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php