MYSQL
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists MYSQL

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old July 24th, 2008, 09:50 AM
Alex
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
"undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"

My code:


// Database stuffs.
mysqlpp::Connection awi_mysql_conn(false);
// Vars for the command line.
TCLAP::ValueArg<char*awi_tclap_mysql_pwd("p","mysql_pwd","MySQL
Password",true,"admin","string");
TCLAP::ValueArg<char*awi_tclap_mysql_usr("u","mysql_usr","MySQL
User",true,"root","string");
TCLAP::ValueArg<char*awi_tclap_mysql_db("d","mysql_db","MySQL
Database",true,"awi","string");
TCLAP::ValueArg<char*awi_tclap_mysql_srv("s","mysql_srv","MySQL
Server",true,"locahost","string");
TCLAP::SwitchArg awi_tclap_open_mode("o","open_mode","Use
Mode",false);
// Stuffs for the system command line. Not the internal CLI.
TCLAP::CmdLine awi_cmd("Artifitical World Intelligence",'
',awi_version,true);
// Send the arguments to TCLAP.
awi_cmd.add(awi_tclap_mysql_pwd);
awi_cmd.add(awi_tclap_mysql_usr);
awi_cmd.add(awi_tclap_mysql_db);
awi_cmd.add(awi_tclap_mysql_srv);
awi_cmd.add(awi_tclap_open_mode);
// Parse the command line.
awi_cmd.parse(argc,argv);
// Get values.
char* awi_mysql_db = awi_tclap_mysql_db.getValue();
char* awi_mysql_srv = awi_tclap_mysql_srv.getValue();
char* awi_mysql_usr = awi_tclap_mysql_usr.getValue();
char* awi_mysql_pwd = awi_tclap_mysql_pwd.getValue();
bool awi_open_mode = awi_tclap_open_mode.getValue();
// Connect to the database using command line values.
>

if(awi_mysql_conn.connect(awi_mysql_db,awi_mysql_s rv,awi_mysql_usr,awi_mysql_pwd)){
std::cout << "Database connection successful." << endl;
}else{
std::cout << "ERRR: Unable to connect to database." << endl;
exit(EXIT_FAILURE);
};
>


The error:


Main.cpp:(.text+0x16e9): undefined reference to
`mysqlpp::Connection::connect(char const*, char const*, char const*, char
const*, unsigned int)'


Does anyone have just the slightest idea what I'm doing wrong? My compiler
command is:


g++ \
-I./lib/MySQLPP -I./lib/TCLAP -I./lib/Miscellaneous \
`mysql_config ` `mysql_config ` `mysql_config ` \
-lmysqlpp -lpthread -lnsl -lresolv \
./src/Main.cpp -o ./bin/AWIWorldServer;
>


To me this seems all good Any ideas?

Thanks.

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists MYSQL > "undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'"


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek