Hi Axel, This is a Windows/VC++ specific problem. An inline function cannot reference a global variable. I have moved the inline definition of TDatabasePDG to the implementation file. Code now in CVS. Rene Brun Axel Naumann wrote: > > Hi, > > I'm linking root against this main: > > #include "TROOT.h" > #include "TDatabasePDG.h" > int main(int argc, char* argv[]){ > TROOT gRoot("globRoot","global Root"); > TDatabasePDG::Instance(); > return 0; > } > > and the linker complains about > teststuff.obj : error LNK2001: unresolved external symbol "protected: static > class TDatabasePDG * TDatabasePDG::fgInstance" > (?fgInstance@TDatabasePDG@@1PAV1@A) > Release/teststuff.exe : fatal error LNK1120: 1 unresolved externals > > The link line is "libCore.lib libEG.lib". I'm using MS VC++ 6, Win 2000; it > happens with both Root 3.00/06 and Root 3.01/00. > > Any ideas about what's going on here? > > Cheers, Axel.
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:45 MET