List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:July 26 2008 12:18pm
Subject:Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"
View as plain text  
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?
Thread
"undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Alex24 Jul
  • Re: "undefined reference to `mysqlpp::Connection::connect(char const*,char const*, char const*, char const*, unsigned int)'"Warren Young24 Jul
    • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Alex25 Jul
      • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Warren Young26 Jul
Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Warren Young26 Jul
Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Alex27 Jul
  • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Warren Young27 Jul
Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Alex27 Jul
  • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Warren Young28 Jul
    • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Alex28 Jul
      • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Warren Young28 Jul
        • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Alex28 Jul
          • Re: "undefined reference to `mysqlpp::Connection::connect(char const*,char const*, char const*, char const*, unsigned int)'"Warren Young28 Jul
            • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Alex29 Jul
              • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Warren Young29 Jul
                • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Alex29 Jul
                  • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Warren Young29 Jul
                    • Re: "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"Alex29 Jul