Compilation problem of a macro

Hi experts,

Could you please help me to spot the problem of compilation here? I can run the macro with .x name.cpp ; however, it doesn’t work when I run and compile with .x name.cpp++.

The file was quite long, but I tried to cut it short. Please, ignore the positioning of stuff in the plot. My focus is compiling issue.

Input File and the macro file are attached here:
MAC.txt (475 Bytes)

PlotTest.cpp (3.4 KB)

You need to enter “MAC” as the input file name when it asks. It does ask and run without compilation.


Part of the terminal message when I compile is below:

sh: -c: line 0: unexpected EOF while looking for matching `"’

sh: -c: line 1: syntax error: unexpected end of file

Error in : Executing 'cd “/Users/spyhunter0066/Library/CloudStorage/” ; clang++ -fPIC -c -O3 -DNDEBUG -std=c++17 -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++ -I/opt/homebrew/Cellar/root/6.26.06_1/include/root -isysroot "/Applications/

It ran without errors for me (Ubuntu on WSL):

  | Welcome to ROOT 6.26/10               |
  | (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Nov 16 2022, 10:42:54                 |
  | From tags/v6-26-10@v6-26-10                                      |
  | With c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0                   |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |

root [0] .x PlotTest.cpp++
Info in <TUnixSystem::ACLiC>: creating shared library /mnt/d/./
Please, put the inputfile name as MAC to plot:
myinput file name: MAC.txt
root [1]

It could be a problem with your ROOT installation or your system.

1 Like

Thanks. Good to know. I may need to reinstall Root on my mac after this approval.

Do you have any suggestion to follow during installation on a Mac?

I don’t use Mac, but you should just follow the installation instructions. I don’t compile ROOT but I still install the required dependencies.

Does anybody know how to delete previous ROOT on Mac to reinstall a new one?

I think I used “brew install root” option when I install it.