# Using MySQL Connector/C++ external libraries in Root

**URL:** <https://root-forum.cern.ch/t/using-mysql-connector-c-external-libraries-in-root/64407>\
**Category:** ROOT\
**Tags:** root\
**Created:** [November 14, 2025, 2:00pm UTC](https://root-forum.cern.ch/t/using-mysql-connector-c-external-libraries-in-root/64407 "2025-11-14T14:00:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtakacs](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/e0b2c6/32.png) [@mtakacs](https://root-forum.cern.ch/u/mtakacs)\
**Post date:** [November 14, 2025, 2:00pm UTC](https://root-forum.cern.ch/t/using-mysql-connector-c-external-libraries-in-root/64407/1 "2025-11-14T14:00:27Z")

</div>

* * *

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

* * *

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [November 14, 2025, 2:26pm UTC](https://root-forum.cern.ch/t/using-mysql-connector-c-external-libraries-in-root/64407/2 "2025-11-14T14:26:18Z")

</div>

> [@mtakacs](#):
>
> 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.

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:

> <https://github.com/root-project/root/pull/17423>
>
> All of them require (optional) dependencies for very little use.
> 
> FYI @andresa…iler

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [November 15, 2025, 6:12pm UTC](https://root-forum.cern.ch/t/using-mysql-connector-c-external-libraries-in-root/64407/3 "2025-11-15T18:12:55Z")

</div>

related: [ODBC and MySQL connectivity with Root 6.36 (and beyond) - #2 by devajith](https://root-forum.cern.ch/t/odbc-and-mysql-connectivity-with-root-6-36-and-beyond/64065/2)

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [November 29, 2025, 6:13pm UTC](https://root-forum.cern.ch/t/using-mysql-connector-c-external-libraries-in-root/64407/4 "2025-11-29T18:13:38Z")

</div>

Closed on November 29, 2025, 6:13pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
