I have a C++ program in which I need to intialize a TVector, but there is an compiling error.
Here is the snippet of code:
TVector v3(1,1,1);
v3.SetMag(ThrustMagAll);
cout << v3 << endl;
v3.SetPhi(ThrustPhiAll);
cout << v3 << endl;
ThrustTheta = acos(ThrustCosThAll);
v3.SetTheta(ThrustTheta);
cout << v3 << endl;
Here is the compile error:
ntp100.cc:438: variable `TVector v3’ has initializer but incomplete type
Here is my compiler:
setenv ROOTSYS /beeraid1/babar/package/root/4.03-02
setenv LD_LIBRARY_PATH /beeraid1/babar/package/root/4.03-02/lib
/usr/bin/g++ -o ntp100 -O -Wno-deprecated -Wall -fPIC -I$ROOTSYS/include ntp100.cc
/barraid1/white/Babar/Research/pidstudy/bin/lib/Linux24/4.03-02/PidTables/*.o
-L$ROOTSYS/lib -lCore -lCint -lHist
-lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lMinuit -lPhysics -lm -ldl -lpthread -rdynamic
Is there a “.h” file that needs to be included as well? I’ve tried other ways to initialize as well, but no success. Any help is appreciated. Much thanks fellow Root Users.