Christian,
You must add -lRGL in your ROOTLIBS.
In interpreted mode, ROOT/CINT can discover automatically in
which library a class is and automatically load this library.
The compiler cannot do this.
To find out in which library a class is, look at
$ROOTSYS/etc/system.rootmap, you will see the library
and its dependencies.
Rene Brun
On Tue, 20 
Jun 
2006, Christian Hansen 
wrote:
>
> Dear Rooters,
>
> I tried TGLPlane. In a macro this worked fine:
>
> #include "iostream"
> #include "TGLUtil.h"
> void test() {
>  TGLVertex3 pointOnPlane;
>  pointOnPlane.Set(2,3,4);
>  TGLVector3 normalForPlane;
>  normalForPlane.Set(2,3,3);
>  TGLPlane* aPlane = new TGLPlane(normalForPlane, pointOnPlane);
>  TGLVertex3 point;
>  pointOnPlane.Set(1,1,1);
>  cout<<"Distance to point = "<<aPlane->DistanceTo(point)<<endl;
> }
>
> root [0] .x test.C
> Distance to point = -5.33002
>
> But then I try to do the same in a test program (attached)
> and it does not want to compile:
>
> PlaneTest.o(.text+0x40): In function `PlaneTest::test()':
> : undefined reference to `TGLVertex3::TGLVertex3()'
> PlaneTest.o(.text+0x71): In function `PlaneTest::test()':
> : undefined reference to `TGLVector3::TGLVector3()'
> and so on...
>
> I'm using version 5.10.
>
> What am I doing wrong... ?
>
> Cheers
> / Christian Hansen
>
> ================================================
> Dep. of Phys.         Office : +1 250 721 7710
> Univ of Victoria      Mobile : +1 250 588 0860
> PO Box 3055
> V8W 3P6 Victoria BC
> Canada
> ------------------------------------------------
> Home Page : http://particle.phys.uvic.ca/~hansen
>            http://cern.ch/christian.hansen
Received on Wed Jun 21 2006 - 07:00:27 MEST
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET