Root on windows with gcc

Hi,

I am trying to make a C++ code using root libraries on windows for data analysis. The code can be divided in two big parts :

  • The part extracting relevant data from the binary files (.dat)
  • The part using the ROOT libraries to process it

The thing the extraction executable crashes when compiled with cl.exe (visual C++) which I use to compile programs including ROOT libraries…So I cannot extract my data with cl and I have to use it to get ROOT…

Can I use ROOT libraries in a program compiled with MinGW gcc/g++ compiler ? If ye, do I have to rebuild ROOT v5.34.36 using MinGW tools ?
(I did search the forum thinking I would find relevant answers, but most of them were 6 years old so I thought it might have changed…)

[quote=“Abazir”]Hi,
The thing the extraction executable crashes when compiled with cl.exe (visual C++)
[/quote]
That’s where it starts and ends - fix it not to crash, I bet it’s:

  • easier than fighting with MinGW/ROOT
  • gives at least some guarantees about what you analysis do, otherwise it all sounds like … haha, “my invalid program managed to extract some apparently invalid data and that’s how I interpret it, now it’s time to publish the results!”

Hi,

I know the program works actually. It was written on linux by one of my colleagues. But we are going to use a computer windows running for the acquisition and we’d like to od everything on it. That is why I try to make it work on windows.

I could always split the program in two. but being able to compile everything on gcc/g++ would have saved some rewriting.