Linker Error if compiling a simple graph in VS

So you probably have to add Core, RIO (for TFile), and Gpad (for TCanvas), something like:

target_link_libraries(MainApp PUBLIC ROOT::Graf ROOT::Core ROOT::RIO ROOT::Gpad)

And since you don’t create any graphical object, you don’t even need ROOT::Graf

1 Like