Error: friend keyword appears outside class definition

Hi all,

I am moving some code developed on OS X with gcc 4.01 and root 5.18/00 to linux (the test system has gcc 4.1.2 and root 5.20/00) and I get the following problem while running rootcint:

%rootcint -f VDisplay_Dict.cpp -c -p -I. -I…/global/ display/VDisplay.h display/VDisplayLinkDef.h
Error: friend keyword appears outside class definition /usr/local/cern/root/v5.20.00/lib/root/cint/cint/lib/prec_stl/vector:598:
Error: friend keyword appears outside class definition /usr/local/cern/root/v5.20.00/lib/root/cint/cint/lib/prec_stl/vector:601:
Warning: Error occurred during reading source files
Note: Link requested for already precompiled class vector<float,allocator > (ignore this message) :0:
Warning: Error occurred during dictionary source generation
!!!Removing VDisplay_Dict.cpp VDisplay_Dict.h !!!

This is a large junk of code and I have no experience with rootcint. std:vectors are used all over the place and I have no idea were to search for the problem. What can be wrong?

Cheers.

Gernot

Hi Gernot,

The dictionary generation for std::vector is fully supported and you should not have any problem. To narrow down the issue I recommend you try removing part of display/VDisplayLinkDef.h and then display/VDisplay.h to narrow down the problem.

Cheers,
Philippe.