5 messages in com.mysql.lists.plusplusRe: <no subject>| From | Sent On | Attachments |
|---|---|---|
| Jens Warfsmann | 14 Mar 2001 07:35 | |
| Martin Sengstschmid | 14 Mar 2001 08:22 | |
| Charlie Younghusband | 14 Mar 2001 08:25 | |
| Brandon | 14 Mar 2001 17:08 | |
| Ralf Buhlrich | 14 Mar 2001 23:17 |
| Subject: | Re: <no subject>![]() |
|---|---|
| From: | Charlie Younghusband (cw...@xiphos.ca) |
| Date: | 03/14/2001 08:25:01 AM |
| List: | com.mysql.lists.plusplus |
When including a library, you don't actually include the 'lib' or '.so' part.
Here is the command I was using to compile my first test program called testconnect: g++ -g -lz -L../lib/lib -lsqlplus -L/usr/lib/mysql -lz -lmysqlclient -I../lib/include -I. -L. -I/usr/include/mysql -o testconnect testconnect.cc
It probably has options you don't need, but it worked for me... Charlie
Jens Warfsmann wrote:
Hi all,
someone can explain me how I get compiled a programme with the mysql++-API.
I tried many things. For example:
--------- g++ -I/home/users/jens/local/mysql++-1.7.8/include -I/usr/local/mysql/include/mysql ./login/JWmysql.cpp -L/usr/local/mysql/lib/mysql -l/home/users/jens/local/mysql++-1.7.8/lib/libsqlplus.so -lmysqlclient
---------
The error is:
--------- /usr/bin/ld: Can't locate file for: -llibsqlplus.so collect2: ld returned 1 exit status
---------
'libsqlplus.so' is in '/home/users/jens/local/mysql++-1.7.8/lib' I also have it in the LD_LIBRARY_PATH
I tried it with kdevelop:
--------- ####### kdevelop will overwrite this part!!! (begin)########## bin_PROGRAMS = login login_SOURCES = JWmysql.cpp main.cpp JWstring.cpp JWcgi.cpp login_LDADD = /home/users/jens/local/mysql++-1.7.8/lib/libsqlplus.so
EXTRA_DIST = JWcgi.cpp JWcgi.h JWstring.cpp JWstring.h main.cpp JWmysql.cpp JWmysql.h
####### kdevelop will overwrite this part!!! (end)############
#INCLUDE = /usr/local/mysql/include/mysql /home/users/jens/local/mysql++-1.7.8/include
CPPFLAGS= -I/usr/local/mysql/include/mysql -I/home/users/jens/local/mysql++-1.7.8/include
-----------
this is the message I got:
----------- bla bla... g++ -O0 -g3 -Wall -o .libs/login JWmysql.o main.o JWstring.o JWcgi.o /home/users/jens/local/mysql++-1.7.8/lib/libsqlplus.so -L/usr/local/mysql/lib/mysql -lz /usr/local/mysql-3.23.32/lib/mysql/libmysqlclient.so -Wl,-rpath -Wl,/home/users/jens/local/mysql++-1.7.8/lib:/usr/local/mysql-3.23.32/lib/mysql /usr/bin/ld: /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/libstdc++.a(streambuf.o): streambuf::uflow(void): multiply defined /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/libstdc++.a(streambuf.o): streambuf::xsputn(char const *, long): multiply defined /bla bla...
------------
Changing the order of flags or adding some others I get different errors.
PLEASE. if there is a way to compile and link a programme with the mysql++-API, tell me how to do it.
Best regards,
Jens Warfsmann
_______________________________________________________________________________ Alles unter einem Dach: Informationen, Fun, E-Mails. Bei WEB.DE: http://web.de Die große Welt der Kommunikation: E-Mail, Fax, SMS, WAP: http://freemail.web.de
-- Charlie Younghusband Network Software Engineering Xiphos Technologies http://www.xiphos.ca/ 514-848-9640 (f) 514-848-9644




