I am installing Inventor from SGI. When compiling, I got this error:
/usr/lib/libGLU.so.1: undefined reference to __rtti_user' /usr/lib/libGLU.so.1: undefined reference to __rtti_si’
/usr/lib/libGLU.so.1: undefined reference to __throw' /usr/lib/libGLU.so.1: undefined reference to terminate(void)’
/usr/lib/libGLU.so.1: undefined reference to __builtin_vec_new' /usr/lib/libGLU.so.1: undefined reference to __builtin_vec_delete’
/usr/lib/libGLU.so.1: undefined reference to __rtti_class' /usr/lib/libGLU.so.1: undefined reference to __builtin_delete’
/usr/lib/libGLU.so.1: undefined reference to __terminate' /usr/lib/libGLU.so.1: undefined reference to __builtin_new’
collect2: ld returned 1 exit status
My system is running on Redhat 8.0
I don’t know how to solve this. Pls help me out. Thanks
Yeah, adding -lGLU will work. But is there any way to let gcc, which is the compiler I use, know where to find GLU lib?
my gcc is 3.2-7, on redhat 8.0.
Yes, but the GLU library is already found otherwise would it not work at all. The problem is probably the linking order. The correct order is to have the highest level libraries first. This is the opposite to the order in a C/C++ program so many people is using the wrong order. In most cases does it work anyway but not always.
I am installing Inventor from SGI. When compiling, I got this error:
[/b]
Widely used GLU implementations on modern Linux distributions consist of a library with a C interface but implemented using C++. This means you have to use c++ instead of cc to link your programs, if they link against libGLU. In plaintext, instead of