Dear all,
I would like to ask for help with compiling ROOT code using external compiler on Windows (Win7 x64 in my case). I don’t know if this topic fits in here, but I saw that some time ago MS Win32 solution for CINT has been provided in this board, but the links are dead. I have spent a lot of time searching the web for a solution but nothing worked for me.
So far I have been working in ROOT using notepad++ and ROOT cmd.exe-style console which was sufficient until I started to write codes over 3000 lines. What I am looking for now is writing ROOT code in some IDE (Eclipse, Visual Studio, it does not really matter) with full code completion, compilation using external compiler (VC9, MinGW, does not really matter), library linking and producing binaries/dlls under Windows. This is useful mainly because the IDE finds errors which ROOT CINT just overlooks (like undeclared variables etc.) and then your whole macro starts acting funny …
Now the problem is I was never able to make this work completely. For example Eclipse project with included headers does code completion, but does not compile to produce a binary (only produced .o objects). In this case it appears the linker is able to find the libraries (all include paths and library paths are correct), but then horribly fails when attempting to link them. A small sample of the error log:
Source\Style_ATLAS_PRAGUE.o:D:\Documents\Projects\Eclipse\CPPM_Datachecks\Debug/…/Source/Style_ATLAS_PRAGUE.cxx:310: first defined here
Source\Style_ATLAS_PRAGUE.o:Style_ATLAS_PRAGUE.cxx:(.text+0x30): undefined reference to TStyle::TStyle(char const*, char const*)' Source\Style_ATLAS_PRAGUE.o:Style_ATLAS_PRAGUE.cxx:(.text+0xd7): undefined reference to
TColor::CreateGradientColorTable(unsigned int, double*, double*, double*, double*, unsigned int)'
Source\Style_ATLAS_PRAGUE.o:Style_ATLAS_PRAGUE.cxx:(.text+0xea): undefined reference to TStyle::SetNumberContours(int)' Source\Style_ATLAS_PRAGUE.o:Style_ATLAS_PRAGUE.cxx:(.text+0x1a8): undefined reference to
TStyle::SetOptStat(int)'
Source\Style_ATLAS_PRAGUE.o:Style_ATLAS_PRAGUE.cxx:(.text+0x1bb): undefined reference to TStyle::SetOptFit(int)' Source\Style_ATLAS_PRAGUE.o:Style_ATLAS_PRAGUE.cxx:(.text+0x260): undefined reference to
TStyle::SetPaperSize(float
If you want to check my code, here are the links.
Eclipse C++ project with included headers and libraries: dl.dropbox.com/u/4567044/CPPM_Datachecks.zip
Plaintext Makefile and code: dl.dropbox.com/u/4567044/CPPM_Da … kefile.zip
If anybody has any suggestion on how to do things with ROOT compilation on Windows, just pick your favourite way and show me? If you have working solutions for Visual Studio with VC9, thats fine. Or maybe Eclipse CDT configuration with MinGW? Or just makefiles for MinGW? Also fine. I am willing to accept anything that would give me code completion and compilation.
If you have anything, please let me know, after weeks at this I am starting to get desperate …
Cheers,
Martin