ROOT Version: 6.26/06
Platform: Windows 10 WSL2/Ubuntu 22.04
Compiler: I don’t know, how do I find it?
TL;DR Does anyone know the full configurations for setting ROOT on VS Code WSL?
Hello everyone, I’m using ROOT on windows 10 wsl without problem. Since I was already using vs code to write my macros, I installed the WSL extension by Microsoft on vs code and added the include paths to the c/c++ intellisense. But I got errors, specifying that the header files was not found and suggesting me to add the path “$ROOTSYS/include” which was already there and ,for example, I needed to “add” this same path for a few times, each from the quick fixes of includes such as TCanvas.h or TGraph.h. I tried a few more configurations such as compiler path, browse path etc. in a span of 3 hours or so but to no avail. I then uninstalled the WSL extension and installed again because of frustration. Then I followed this tutorial, no more include path errors but I cannot run the macro, it gives this error:
but my launch.json file is the same as in the tutorial and both paths are correct.
I also don’t know which compiler do I use when I succesfully run ROOT macros, I searched on the internet as to how to determine it but couldn’t find anything, an old forum post indicating cint, some documents indicating cling. Also searched through the root config files to find it but was unable to do so. How can I know the compiler that I use?
I’d really appreciate all help
EDIT: I can actually use the terminal to run the macro, I don’t really need to run it through VS Code but I’m still curious for why I couldn’t get it to run.
Also, for convenience, I tried to create a header that contains all ROOT headers using this in terminal:
$HEADER=allheaders.h echo "#ifndef __ALL_HEADERS__" > $HEADER echo "#define __ALL_HEADERS__" >> $HEADER for f in $(find . -name '*.h'); do echo "#include <$f>" >> $HEADER; done echo "#endif" >> $HEADER
But it gave me multiple errors when I included it, that dependincies could not be opened. Any idea how can I achieve it?