Possibly incorrect bash profile

ROOT Version: 6.18/04
Platform: VSCode
Compiler: Terminal
System: Mac OSX

I downloaded root, but I’m not sure if I set my .bash~profile correctly. What lines should I have in my .bash~profile in order to make it work correctly? Currently, I have:

export ROOTSYS=/usr/local/root
export PATH=$ROOTSYS/bin:$PATH

Not sure if this is correct. I’m skeptical because when I run a macro with:

#include <iostream>
#include <cmath>

The first line gives two errors, namely "include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/Users/myname/Documents/root2/macros/f1.C)"

"cannot open source file “iostream”"

The second lines gives the error "cannot open source file “cmath”"

What do I fix, if anything?



maybe @Axel or @oshadura can help when they are back from vacation. How did you install root?

Actually, I fixed it. Thanks anyways.

Could you share what you did to fix it, for other people to know should they see the same issue?

In actuality, I fixed another error that upon fixing, allowed me to run my code. (I moved my files to a place where they would actually be opened by the code). I realize that I didn’t fix my code to solve the original problem. I’m still confused as to what the bash profile exactly does and I don’t know what lines I should put in there.

Anyways, here is how I downloaded root: (for Mac OSX)

  1. Download OsX 10.14 clang100 from https://root.cern.ch/content/release-61804

  2. Once it’s done, I put the root folder in my Documents folder (not required, you can keep the file anywhere)

  3. Go to the Mac Terminal. Type in “cd Documents” (if applicable, again not necessary if you didn’t place in your documents folder.

  4. If no error shows, type in “cd root” (or something else if you have duplicate root folders)

  5. Type in “source ./bin/thisroot.sh”

  6. Type in “root” and it works.