Below is a highly simplified set of source files. When I try to make these I get the following:
$ make
g++ -c -Wall -fno-exceptions -fPIC -I/usr/local/root/pro/include -g foo.cc
make: Circular fooDict.cc <- fooDict.o dependency dropped.
Generating Decoder Dictionary…
/usr/local/root/pro/bin/rootcint -f fooDict.cc -c -p foo.hh fooLinkDef.hh
Error: friend keyword appears outside class definition /usr/local/root/pro/cint/lib/prec_stl/vector:598:
Error: friend keyword appears outside class definition /usr/local/root/pro/cint/lib/prec_stl/vector:601:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing fooDict.cc fooDict.h !!!
Error: /usr/local/root/pro/bin/rootcint: error loading headers…
make: *** [fooDict.cc] Error 1
If I comment out the vector argument to the Foo constructor, everything makes without error. What am I doing wrong?
Here are the sources:
//========== foo.hh ===============
#include <TROOT.h>
#include <TRint.h>
#include
using namespace std;
class FooClass
{
public:
FooClass (
// Commenting out next line eliminates the errors:
const vector xx
) {};
private:
#ifndef NODICT
ClassDef(FooClass, 0)
#endif
};
//========== foo.cc ===============
#include “foo.hh”
#ifndef NODICT
ClassImp(FooClass)
#endif
int
main (int argc, char **argv)
{
return 0;
}
//========== fooLinkDef.hh ===============
#ifdef CINT
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class FooClass;
#endif