Error in TDecompBase.h

Hi,

I need to do some matrix arithmatic in a C++ program I am writing. When I try and include the SVD class header

I get the following compiler error:

[quote]++ -g -Wall -I/usr/local/root/include -o neutrinoPulse.o
-c neutrinoPulse.cc
In file included from /usr/local/root/include/TDecompSVD.h:22,
from NuPulseHit.hh:15,
from neutrinoPulse.cc:23:
/usr/local/root/include/TDecompBase.h:74: error: syntax error before `-’ token
make: *** [neutrinoPulse.o] Error 1
[/quote]

line 74 of TDecompBase.h reads:

so this doesn’t appear to make sense.

I have the following include statements in the code:

#include <TVector3.h> #include <TMatrixD.h> #include <TMath.h> #include <TRandom3.h> #include <TH1F.h> #include <TF1.h> #include <TFile.h> #include <TGaxis.h> #include <TObjArray.h> #include <TObject.h>

and the following dynamic links in my makefile:

$(C++) $(CFLAGS) -rdynamic -L$(ROOTSYS)/lib -Llib -lCore -lCint \ -lHist -lGraf -lGraf3d -lGpad -lGui -lTable -lTree \ -lPhysics -lMatrix -lRint -lX3d -lm -ldl -lpthread

am I missing a header or dynamic library required for the SVD class?

I run root 4.00/04 on Linux Fedora Core 1 with g++ 3.3.2

Regards

Jon

Hi,

This is very strange. The most likely cause is that some header #define one of the word on the line and/or there is a problem before the inclusion of the file.

Either way, you can run

and see what the C++ compiler really tries to compile.

Cheers,
Philippe.

Thanx for the tip, we got around this by removing the variable name in the function declaration, hence line 74 now reads

Regards

Jon