I am trying to compile a ROOT program using the Code::Blocks IDE. In ‘Global Compiler Settings->Linker Settings’ I added all the library files in C:\root\lib, and in ‘Global Compiler Settings->Search Directories->Compiler’ I pointed it to the C:\root\include\ folder.
When I try to compile the program I get ‘undefined reference’ errors to all the ROOT functions in the code, and I have included the proper ROOT header in the code. What am I missing?
don’t put all the libs into the link line; libCore.lib libCint.lib libRIO.lib libNet.lib libHist.lib libGraf.lib libGraf3d.lib libGpad.lib libTree.lib libRint.lib libPostscript.lib libMatrix.lib libPhysics.lib libMathCore.lib libThread.lib libGui.lib should be sufficient.
Which compiler and version do you use? Which exact ROOT version did you download and install? What’s the command line issues by code blocks that invokes the linker? What are the error messages?