info-inventor-dev
[Top] [All Lists]

SbVec3f

To: info-inventor-dev@xxxxxxxxxxx
Subject: SbVec3f
From: Filip Schutyser <filip.schutyser1@xxxxxxxxxx>
Date: Wed, 25 Oct 2000 10:49:29 +0200
Sender: owner-info-inventor-dev@xxxxxxxxxxx
Hi,

I have some experience using OpenInventor on SGI systems. Currently, I thinking about porting my system using OpenInventor towards linux. However, I have some linking problems.

If I try to compile and link this test program
 

#include <iostream.h>

main(int argc, char **argv)
  {
    SbVec3f a;
    a.setValue(2.0,3.5,5.0);
    cout<<"a = ["<<a[0]<<" "<<a[1]<<" "<<a[2]<<"]"<<endl;
  } // end main

I get the following errors:

Compiling test.C
g++ -DPOSIX_SOURCE -D_XOPEN_SOURCE -O2       -c test.C -o test.o

Linking
g++ -DPOSIX_SOURCE -D_XOPEN_SOURCE -O2 test.o     -L/usr/lib -lInventor -lm -lGL -lGLU -ldl  -lm    -o invTest
test.o: In function `main':
test.o(.text+0xd): undefined reference to `SbVec3f::SbVec3f(void)'
test.o(.text+0x22): undefined reference to `SbVec3f::setValue(float, float, float)'
test.o(.text+0x4d): undefined reference to `SbVec3f::operator[](int)'
test.o(.text+0x74): undefined reference to `SbVec3f::operator[](int)'
test.o(.text+0x9b): undefined reference to `SbVec3f::operator[](int)'
collect2: ld returned 1 exit status
make: *** [invTest] Error 1

I'm using glibc-2.1.1-6 on a Redhat 6.0 system.

What am I doing wrong?

Thanks,

Filip Schutyser
 

<Prev in Thread] Current Thread [Next in Thread>