Greetings,
I made a post a while ago about issues with using Zig’s c++ compiler to compile a sample program that utilizes the ROOT Analysis Framework libraries. I have updated the zig cpp build template I was using to follow 0.15.1 standards, but I am still having troubles.
Looking into the problem I thought that maybe it was due to the compiler and version with which ROOT’s shared libraries were compiled (by default it was gcc) so I compiled a local version of root using Clang++ 20.1.8 and tried using those header files instead. Unfortunately this did not seem to address the issues.
I have confirmed that the program code works by running:
clang++ -pthread -std=c++20 -m64 -I/home/username/src/.commits/cpp-build-template/src/cpp/../../../../root_src/install/include main.cpp -o main -L/home/username/src/root_src/install/lib -lCore -lImt -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lGenVector -lROOTVecOps -lMathCore -lTree -lTreePlayer -lRint -lPostscript -lMatrix -lPhysics -lThread -lROOTNTuple -lMultiProc -lROOTDataFrame -lROOTNTupleUtil -Wl,-rpath,/home/username/src/root_src/install/lib -pthread -lm -ldl -rdynamic
Trying to compile main.cpp with either the build system or by replacing clang++ with zig c++ results in the error messages I have attached here (this has been done with both 0.15.1 and with master).
The code may be found at this github (be warned, though I have compressed the relevant library and header files into zip folders, it is currenly a somewhat large repo to download).
Any help would be appreciated.
inlineErr.txt (43.4 KB)
zigbuilderr.txt (25.4 KB)