Using MySQL Connector/C++ external libraries in Root


Dear all,

since the native mysql and odbc support was removed from the newer versions of Root 6, I would like to ask for some tips how one can use the MySQL Connector/C++ libraries in connection with Root.

Instead of linking and compiling everyhting with Visual Studio as a standalone exe file, if possible I would like to use the usual .L mycode.cpp++ option.

I tried loading the mysqlcppconn.lib external library with the gSystem->Load() command, but it did not work, because Root did not find the mysqlcppconn.lib file - even when I copied it to the ROOT\lib folder.

I would highly appreciate your help.

ROOT Version: 6.36.02
Platform: Windows 11
Compiler: Visual Studio 17.12.2


in ROOT one can only load DLLs, no static libraries. And I’m afraid there is no straightforward solution to your problem, only using a version of ROOT including odbc support.
And see also:

related: ODBC and MySQL connectivity with Root 6.36 (and beyond) - #2 by devajith