Skip to content
Advertisement

Poco C++ Libraries: “Not found: mysql”

I am using poco-1.7.7 with MySQL. I am building with g++ on Ubuntu. Building, linking and running works fine. However, when a Data Session is created, an exception “Not found: mysql” is thrown:

JavaScript

The mysql client is installed and is part of $PATH.

Additional information: I am running Ubuntu using Docker. See below for Makefile. The same code can connect to MySQL when I compile and run on MacOSX.

Do you have any idea what is going wrong here?

Snippet from Makefile:

JavaScript

Advertisement

Answer

After a lot of debugging i found out, that for some reason the MySQL Connector was not initialized. Explicitly calling Poco::Data::MySQL::Connector::registerConnector(); solved the problem.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement