ROOT::Math::Minimizer on windows

I’m developing a program on Windows with Qt and mvsc 18 (visual studio 2013) compiler.
I need perform some minimization with root and I’m basically following this example
which is working if i run it from root
but in my program the line

ROOT::Math::Minimizer* min =ROOT::Math::Factory::CreateMinimizer(minName, algoName);

can’t initialize the minimizer and after I get a null pointer.
Can someone help me?

I got it working bypassing the factory creation method ad calling directly

so i suppose there something wrong with the factory.


It should have worked also using the Factory() method (i.e. with the plug-in manager). Which minimiser name did you use, “Minuit2” ?
In case, can you add the line gDebug=1 and send me the resulting messages printed, to understand better what failed.

Best Regards