I have clearly marked the header files, but after compilation:
g++ -o TestMaxwell TestMaxwell.cpp
there are errors reported:
TestMaxwell.cpp:1:10: fatal error: TMath.h: No such file or directory
1 | #include "TMath.h"
| ^~~~~~~~~
compilation terminated.
I have also installed the Boost library:
sudo apt-get install libboost-all-dev
At the same time, there are errors reported when calling the link.
root[0] .L Maxwell.C+
Error in <TRint::ProcessLine>: macro Maxwell.C not found in path .:/home/linbo/root/macros
I’m a little confused. Can the functions I wrote in the Ubuntu user interface be linked to under root?
I’m embarrassed to ask such basic questions, but after searching the internet for a long time without finding solutions to my problems, I’ve decided to post a topic in the forum. Do you have any good root introductory videos or PDF files on learning astronomical data fitting? I would be very grateful.
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x1b): undefined reference to `main'
collect2: error: ld returned 1 exit status
root [0] .L Maxwell.C+
Error in <TRint::ProcessLine>: macro Maxwell.C not found in path .:/home/linbo/root/macros
I followed the tutorial from [root_for_beginners_Day3], but I was unable to load it successfully. I’m not sure how they did it, and the link to this portion of the tutorial is [http://caeinfo.in2p3.fr/root/Formation/en/Day3/Maxwell.C], and I was unable to open it as well.