I have the same error messages when I am trying to compile a garfield++ project using ViewCell, e.g.
/unix/muons/g-2/garfield/Library/libGarfield.a(ViewCell.o): In function `Garfield::ViewCell::IsA() const':
ViewCell.cc:(.text._ZNK8Garfield8ViewCell3IsAEv[Garfield::ViewCell::IsA() const]+0xc): undefined reference to `Garfield::ViewCell::Class()'
/unix/muons/g-2/garfield/Library/libGarfield.a(ViewCell.o):(.data.rel.ro._ZTVN8Garfield8ViewCellE[vtable for Garfield:]+0x1d0): undefined reference to `Garfield::ViewCell::ShowMembers(TMemberInspector&)'
/unix/muons/g-2/garfield/Library/libGarfield.a(ViewCell.o):(.data.rel.ro._ZTVN8Garfield8ViewCellE[vtable for Garfield:]+0x1d8): undefined reference to `Garfield::ViewCell::Streamer(TBuffer&)'
/unix/muons/g-2/garfield/Library/libGarfield.a(ViewGeometry.o): In function `Garfield::ViewGeometry::IsA() const':
ViewGeometry.cc:(.text._ZNK8Garfield12ViewGeometry3IsAEv[Garfield::ViewGeometry::IsA() const]+0xc): undefined reference to `Garfield::ViewGeometry::Class()'
/unix/muons/g-2/garfield/Library/libGarfield.a(ViewGeometry.o):(.data.rel.ro._ZTVN8Garfield12ViewGeometryE[vtable for Garfield::ViewGeometry]+0x1d0): undefined reference to `Garfield::ViewGeometry::ShowMembers(TMemberInspector&)'
/unix/muons/g-2/garfield/Library/libGarfield.a(ViewGeometry.o):(.data.rel.ro._ZTVN8Garfield12ViewGeometryE[vtable for Garfield::ViewGeometry]+0x1d8): undefined reference to `Garfield::ViewGeometry::Streamer(TBuffer&)'
collect2: ld returned 1 exit status
I have looked at the Link.h file as suggested but all linea are already uncommented in there. Are there any other recommendations for how to solve this?
I have exactly the same compilation errors (see first message) with gcc 4.4.7 (and ROOT 5.34/18) on ubuntu 12.04 64 bit and gcc 4.6.3 (and ROOT 5.34/20) on CentOS 6.5 64 bit, using the garfield++ revision 353, the downloaded garfroot.C and the following downloaded makefile :
The documentation indicates a Garfroot compilation fail known with gcc 4.7 or higher. I used various lower versions, so the gcc version is probably not the origin of this problem. The same error message is also present for me with an old version of garfield++ (revision 294).
I have the same problem compiling a simple.C (e.g. modifying the gasfile.C example ) program with ViewCell and ViewGeometry
/home/fwauters/garfield/Library/libGarfield.a(ViewGeometry.o): In function `Garfield::ViewGeometry::IsA() const':
ViewGeometry.cc:(.text._ZNK8Garfield12ViewGeometry3IsAEv[Garfield::ViewGeometry::IsA() const]+0xc): undefined reference to `Garfield::ViewGeometry::Class()'
/home/fwauters/garfield/Library/libGarfield.a(ViewGeometry.o):(.data.rel.ro._ZTVN8Garfield12ViewGeometryE[vtable for Garfield::ViewGeometry]+0x1d0): undefined reference to `Garfield::ViewGeometry::ShowMembers(TMemberInspector&)'
/home/fwauters/garfield/Library/libGarfield.a(ViewGeometry.o):(.data.rel.ro._ZTVN8Garfield12ViewGeometryE[vtable for Garfield::ViewGeometry]+0x1d8): undefined reference to `Garfield::ViewGeometry::Streamer(TBuffer&)'
My Compiler: gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Linux distr: Scientific Linux release 6.5