Hi Ali, I'll repeat what I've already said, it is the ld command that is having the problem. If you don't know what the ld command is or does, you need to look elsewhere for the answer as this is beyond the scope of this list. As I have previously mentioned, try
$ man ldconfig Your problem is as it states /usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: cannot find -lmysqlclient <-- here is the problem collect2: ld returned 1 exit status The linker, ld, does not know where to find the library libmysqlclient.so. You need to tell the linker using either ldconfig (man ldconfig) or LD_LIBRARY_PATH variable. eg. export LD_LIBRARY_PATH=<path to mysqlclient library> Regards --------------------------------------------------------------- ********** _/ ********** David Logan ******* _/ ******* ITO Delivery Specialist - Database ***** _/ ***** Hewlett-Packard Australia Ltd **** _/_/_/ _/_/_/ **** E-Mail: [EMAIL PROTECTED] **** _/ _/ _/ _/ **** Desk: +618 8408 4273 **** _/ _/ _/_/_/ **** Mobile: 0417 268 665 ***** _/ ****** ****** _/ ******** Postal: 148 Frome Street, ******** _/ ********** Adelaide SA 5001 Australia i n v e n t --------------------------------------------------------------- -----Original Message----- From: ali asghar torabi parizy [mailto:[EMAIL PROTECTED] Sent: Monday, 24 July 2006 7:29 PM To: mysql@lists.mysql.com Subject: RE: undefined reference to `mysqlpp::Connection::Connection(bool)' Hi.thanks logan. I am begeener to MySQL. I have installed Suse10 and MySQL and mysql++ in my pc. i trying too many pathes in gcc cammand but that error continued. I am getting the following error. ######################################## # gcc -o custom1 -lmysqlclient -L /usr/local/mysql/lib/mysql/ custom1.cpp #gcc -o custom1 -lmysqlclient -L /usr/local/mysqlpp/include/mysql++ custom1.cpp gcc -o custom1 -lmysqlclient -L /usr/local/mysql/lib/mysql/ -L /usr/local/mysqlpp/include/mysql++ custom1.cpp for all statements following error continued:( ############################################# /usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status a-toraby:~/c/example # gcc -o custom1 -lmysqlclient -L /usr/local/mysql/lib/mysql/ custom1.cpp /tmp/ccPQEF5p.o: In function `main': custom1.cpp:(.text+0x2f): undefined reference to `mysqlpp::Connection::Connection(bool)' custom1.cpp:(.text+0x46): undefined reference to `connect_to_db(int, char**, mysqlpp::Connection&, char const*)' custom1.cpp:(.text+0x7f): undefined reference to `mysqlpp::Connection::query()' custom1.cpp:(.text+0x96): undefined reference to `std::basic_ostream std::char_traits >& std::operator<< >(std::basic_ostream >&, char const*)'... ... ... ... ... ...std::allocator > >(std::vector >&, mysqlpp::SQLQueryParms&, mysqlpp::query_reset)]+0x50): undefined reference to `std::basic_string, std::allocator >::c_str() const' custom1.cpp:(.gnu.linkonce.t._ZN7mysqlpp5Query7storeinISt6vectorI5stockSaIS3_EEEEvRT_RNS_13SQLQueryParmsENS_11query_resetE[void mysqlpp::Query::storein > >(std::vector >&, mysqlpp::SQLQueryParms&, mysqlpp::query_reset)]+0x71): undefined reference to `std::basic_string, std::allocator >::~basic_string()' custom1.cpp:(.gnu.linkonce.t._ZN7mysqlpp5Query7storeinISt6vectorI5stockSaIS3_EEEEvRT_RNS_13SQLQueryParmsENS_11query_resetE[void mysqlpp::Query::storein std::allocator > >(std::vector >&, mysqlpp::SQLQueryParms&, mysqlpp::query_reset)]+0x88): undefined reference to `std::basic_string, std::allocator >::~basic_string()' /tmp/ccPQEF5p.o:(.gnu.linkonce.r._ZTIN7mysqlpp8BadQueryE[typeinfo for mysqlpp::BadQuery]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' /tmp/ccPQEF5p.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status ################################################### my code is standard code in mysql++ examples directory please help me. --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1ยข/min. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] --------------------------------- How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]