>
> Please keep replies on the mailing list.
Sorry, this whole mailing list thing is new to me. Hope I did it right this
time.
> I assume obj/AWIWorldServer.o does get created?
Yes.
> Can you post the complete output of the second command? (No need to re-run
> the first command once you have the .o file.)
Err, is this readable?:
> GamerzWoW /home/awi: g++ -v ./obj/AWIWorldServer.o -o ./bin/AWIWorldServer
> -lmysqlpp `mysql_config --libs_r` -lpthread -lnsl -lresolv
> Using built-in specs.
> Target: i486-linux-gnu
> Configured with: ../src/configure -v
> --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
> --enable-shared --with-system-zlib --libexecdir=/usr/lib
> --without-included-gettext --enable-threads=posix --enable-nls
> --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
> --enable-libstdcxx-debug --enable-mpfr --with-tune=i686
> --enable-checking=release i486-linux-gnu
> Thread model: posix
> gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
> /usr/lib/gcc/i486-linux-gnu/4.1.2/collect2 --eh-frame-hdr -m elf_i386
> -dynamic-linker /lib/ld-linux.so.2 -o ./bin/AWIWorldServer
> /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o
> /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crti.o
> /usr/lib/gcc/i486-linux-gnu/4.1.2/crtbegin.o -L/usr/lib/mysql
> -L/usr/lib/gcc/i486-linux-gnu/4.1.2 -L/usr/lib/gcc/i486-linux-gnu/4.1.2
> -L/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib -L/lib/../lib
> -L/usr/lib/../lib ./obj/AWIWorldServer.o -lmysqlpp -lmysqlclient_r -lpthread
> -lnsl -lresolv -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
> /usr/lib/gcc/i486-linux-gnu/4.1.2/crtend.o
> /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crtn.o
> ./obj/AWIWorldServer.o: In function `main':
> Main.cpp:(.text+0x16fd): undefined reference to
> `mysqlpp::Connection::connect(char const*, char const*, char const*, char
> const*, unsigned int)'
> collect2: ld returned 1 exit status
What OS are you using?
Debian Etch.
> Have you read the relevant README-*.txt file to see if there is anything
> special you have to do for your system to complete the installation?
> ldconfig on Linux, for example?
Yes, but didn't find anything of use.
> Where is libmysqlpp.* installed on your system? Have you tried adding an
> -L flag to the link command to tell the compiler about this directory?
The link command is the first command I run, right?
As for the directory of libmysqlpp:
> GamerzWoW /home/awi: find / | grep libmysqlpp
> /usr/lib/libmysqlpp.la
> /usr/lib/libmysqlpp.so.2
> /usr/lib/libmysqlpp.so
> /usr/lib/libmysqlpp.so.2.0.7
Hope this can help you to help me. :P
Thanks.
2008/7/26 Warren Young <mysqlpp@stripped>
> Please keep replies on the mailing list.
>
>
> On Jul 26, 2008, at 4:34 AM, Alex wrote:
>
> Updated my compile command to look like this:
>>
>> g++ \
>> -I./lib/MySQLPP -I./lib/TCLAP -I./lib/Miscellaneous `mysql_config
>> --cflags` \
>> -c -o ./obj/AWIWorldServer.o ./src/Main.cpp;
>> g++ \
>> ./obj/AWIWorldServer.o -o ./bin/AWIWorldServer \
>> -lmysqlpp `mysql_config --libs_r` -lpthread -lnsl -lresolv;
>> Seems correct, no? Nevertheless, I still get that linker error. =X
>>
>
> I assume obj/AWIWorldServer.o does get created?
>
> Can you post the complete output of the second command? (No need to re-run
> the first command once you have the .o file.)
>
> Where is libmysqlpp.* installed on your system? Have you tried adding an
> -L flag to the link command to tell the compiler about this directory?
>
> What OS are you using?
>
> Have you read the relevant README-*.txt file to see if there is anything
> special you have to do for your system to complete the installation?
> ldconfig on Linux, for example?
>
>
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:
> http://lists.mysql.com/plusplus?unsub=1
>
>
--
GamerzWoW - http://www.gamerzwow.net
--
GamerzWoW - http://www.gamerzwow.net
| Thread |
|---|
| • "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Alex | 24 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*,char const*, char const*, char const*, unsigned int)'" | Warren Young | 24 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Alex | 25 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Warren Young | 26 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Warren Young | 26 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Alex | 27 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Warren Young | 27 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Alex | 27 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Warren Young | 28 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Alex | 28 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Warren Young | 28 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Alex | 28 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*,char const*, char const*, char const*, unsigned int)'" | Warren Young | 28 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Alex | 29 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Warren Young | 29 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Alex | 29 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Warren Young | 29 Jul |
| • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'" | Alex | 29 Jul |