are valid also for a C++ program.
You just need to add the link to the ROOT include and libraries if you want to use them together.
If you want to use it from the ROOT interpreter, just load your program as a macro in the interpreter after having loaded first the needed Mathematical library (including MathLink)
I have no problem building your program. Maybe there is a problem finding the ROOT libraries. You should check if you can find correctly the ROOT libraries and you have them installed. You can try with a simpler ROOT program.
Try: `root-config --cxx --cflags` -o NumericalMinimization NumericalMinimization.cxx `root-config --libs`
Also, try:
root-config --features
and see if you have “minuit2” among available features, or try:
root-config --has-minuit2
and see if you get “yes”.
If you do not have “minuit2”, you will need to build your ROOT completely from scratch again (adding, for example, “-Dall=ON” to the cmake configuration step).
I may have not expressed clearly, because I use -std=c++1y which is different from “__cxx11” in the error message. I am using MAC OSX, maybe it using c++1y, not cxx11.