Matplotlib embedded in c++ application


I’am currectly using matplotlib as plotting library for my application. My application is written in c++, using gtkmm for GUI. On Linux OS everything is working perfectly, the problems comes up on Windows.
I am currenctly using mingw64 to compile my code.
My idea is to build a self-extracting .exe file which contains all the python script/.dll that my code needs to run.
I have almost added all the .dll needed by matplotlib and numpy. The last dependence that I cannot solve is related to matplotlib backends. In fact, when I run my code it shows the usual error:

UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.

If I run my code from mingw64 shell, it works; in fact matplotlib shows that it is using TkAgg as backend.
So, my question is: Which are the .dll or the python scripts that matplotlib needs to run TkAgg as backend?

Thank you so much for your help.

You need to make sure that the python you are embedding into your program is build with tk support and then you will need to include the tk dlls.

That said, if your appliaction is gtk, you probably want to be using the gtk based backends so you do not have two GUI event loops running at the same time.

Thank you so much fo the advice of using gtk as backend. Would you suggest to change it from the python code or from the configuration file?
One more question, do you know the list of the dlls associated with tk or how to get it?