Friend keyword appears outside class definition

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

Hi,
could you please try to add a dictionary for vector?
Axel.

Like this? Same thing happens.

//========== fooLinkDef.hh ===============
#ifdef CINT

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class std::vector;
#pragma link C++ class FooClass;

#endif

Oh, I should add version information:
OS is Scientific Linux 4
gcc is version 3.4.6 20060404 (Red Hat 3.4.6-8)
ROOT is version 5.15/08

In fact, with that line in fooLinkdef.hh, I get the same error regardless of whether the vector argument is present in the constructor or not. Adding #pragma link C++ class std::vector; causes the error to occur.

Hi,

To work around the problem use vector (rather than the short form).

Cheers,
Philippe.

That works, thanks!