0

I know this question has been asked few number of times but after searching for a day I still cannot resolve it. I am trying to use the POCO C++ LIBRARIES and ubuntu 16.0.4 LTS comes with POCO 1.3 installed. I downloaded the latest version of POCO and built and installed it to /home/{username}/poco-1.9.0-all. But when I build my project using eclipse I get the following error:

Building target: AuthorizationServer
Invoking: GCC C++ Linker
g++ -L/home/{username}/poco-1.9.0-all/lib -o "AuthorizationServer"  ./src/entity/ResourceOwner.o  ./src/database/MySQL.o  ./main.o   -lPocoFoundation -lPocoData -lPocoMySQL
/usr/bin/ld: warning: libPocoData.so.9, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libPocoMySQL.so, may conflict with libPocoData.so.60
/usr/bin/ld: warning: libPocoFoundation.so.9, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libPocoMySQL.so, may conflict with libPocoFoundation.so.60
Finished building target: AuthorizationServer

But following the instructions from link1 I can see that my project has been properly configured and uses -L/home/{username}/poco-1.9.0-all/lib. Can anyone help me with this issue. Thanks in advance.
My eclipse project properties is as follow:

C/C++ Build->Settings->Tool Settings->GCC C++ Compiler->Includes->Include paths(-I) contains /home/{username}/poco-1.9.0-all/include

C/C++ Build->Settings->Tool Settings->GCC C++ Linker->Libraries->Libraries (-l) contains PocoFoundation, PocoData, PocoMySQL

C/C++ Build->Settings->Tool Settings->GCC C++ Linker->Libraries->Library search path(-L) contains /home/{username}/poco-1.9.0-all/lib

Ian Abbott
  • 15,083
  • 19
  • 33
Roham Amini
  • 361
  • 3
  • 12

1 Answers1

1

The error message says that -lPocoMySQL comes from /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libPocoMySQL.so, not from /home/{username}/poco-1.9.0-all/lib.

Make sure that:

  • you have built libPocoMySQL.so, and
  • /home/{username}/poco-1.9.0-all is a valid path (it does not look like one).
Maxim Egorushkin
  • 131,725
  • 17
  • 180
  • 271
  • Thank you for your answer. Looking at the library now I understood that PocoMySQL has been renamed to PocoDataMySQL in the latest version of the library. Using -lPocoDataMySQL resolved the issue. – Roham Amini Aug 22 '18 at 15:21