List:MySQL++« Previous MessageNext Message »
From:Sebasti├ín Salazar Molina. Date:February 26 2009 2:59pm
Subject:Connection pool compile
View as plain text  
I tried to overload the assignment operator, but gave me some collateral 
problems and I have no time to revise it, but I think it can be done in a 
simple way.

I have a compilation problem, I am using the example of the kind of connection 
pool and get the following error:

seba@VF-1S:~/sources/GiftCard/src/switch/libs$ LC_ALL=C make prueba_myop
g++ -g3 -c 
mysql_op.cpp -I/usr/include/mysql -I../../../mysql++/include/mysql++
g++ -g3 -o prueba prueba_myop.cpp 
mysql_op.cpp -I/usr/include/mysql -I../../../mysql++/include/mysql++ -L/usr/lib
-L../../../mysql++/lib -lmysqlpp -lmysqlclient
multiple definition of `poolptr'

first defined here
collect2: ld returned 1 exit status
make: *** [prueba_myop] Error 1

In that line a prototipe function:

int MySQL::doSQL(vector<string> sql, bool result) {
	return 0;

And I have a global pointer:
SimpleConnectionPool* poolptr = 0;

This object is from the example.
Connection pool compileSebasti├ín Salazar Molina.26 Feb
  • Re: Connection pool compileWarren Young26 Feb