Installed NVidia => Doesn't link anymore?

I downloaded nehe tutorial19. It compiled, linked and ran ok, but very slow since NVidia drivers were not installed.
I installed nvidia drivers but now the tutorial doesn’t link anymore, why??

Here are part of linking result:

gcc -Wall -pedantic -ansi lesson19.c -o lesson19 -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm
/tmp/cc6ZuAGu.o: In function killGLWindow': /tmp/cc6ZuAGu.o(.text+0x15de): undefined reference to XCloseDisplay’
/tmp/cc6ZuAGu.o: In function createGLWindow': /tmp/cc6ZuAGu.o(.text+0x1605): undefined reference to XOpenDisplay’
/tmp/cc6ZuAGu.o(.text+0x17cf): undefined reference to XCreateColormap' /tmp/cc6ZuAGu.o(.text+0x1888): undefined reference to XFree’
/tmp/cc6ZuAGu.o(.text+0x18f3): undefined reference to XCreateWindow' /tmp/cc6ZuAGu.o(.text+0x191f): undefined reference to XWarpPointer’
/tmp/cc6ZuAGu.o(.text+0x1936): undefined reference to XMapRaised' /tmp/cc6ZuAGu.o(.text+0x1955): undefined reference to XGrabKeyboard’
/tmp/cc6ZuAGu.o(.text+0x197e): undefined reference to XGrabPointer' /tmp/cc6ZuAGu.o(.text+0x19ea): undefined reference to XCreateWindow’
/tmp/cc6ZuAGu.o(.text+0x1a09): undefined reference to XInternAtom' /tmp/cc6ZuAGu.o(.text+0x1a28): undefined reference to XSetWMProtocols’
/tmp/cc6ZuAGu.o(.text+0x1a4c): undefined reference to XSetStandardProperties' /tmp/cc6ZuAGu.o(.text+0x1a63): undefined reference to XMapRaised’
/tmp/cc6ZuAGu.o(.text+0x1ab8): undefined reference to `XGetGeometry’
It seems that every undefined references are to every X* function.
What do I need to install?

add, -lXll to the gcc call…

didn’t help
It linked and ran ok before I installed NVidia newest drivers. Everything is working well, but can’t link?

What might it have removed?

Hm, installed again the nvidia-glx part.
Now there are much less errors???
Maybe reboot helps… NOW!

didn’t help. Installed all nvidia-drivers again. but no

If someone knows what causes these linking errors, please help:

gcc -Wall -pedantic -ansi lesson19.c -o lesson19 -L/usr/X11R6/lib -lGL -lGLU -/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o)(.text+0x7d9): more undefined references to XMissingExtension' follow /usr/lib/gcc-lib/i386-linux/2.95.4/libgcc.a(_eh.o): In functioneh_context_free’:
_eh.o(.text+0xe8): undefined reference to pthread_setspecific' /usr/lib/gcc-lib/i386-linux/2.95.4/libgcc.a(_eh.o): In functioneh_threads_initialize’:
_eh.o(.text+0x169): undefined reference to pthread_key_create' /usr/lib/gcc-lib/i386-linux/2.95.4/libgcc.a(_eh.o): In functioneh_context_specific’:
_eh.o(.text+0x276): undefined reference to pthread_getspecific' _eh.o(.text+0x295): undefined reference topthread_setspecific’
collect2: ld returned 1 exit status
make: *** [all] Error 1
lXxf86vm -lX11
/usr/X11R6/lib/libGL.a(glxext.o): In function __glXGetCurrentContext': glxext.o(.text+0x1a): undefined reference topthread_key_create’
glxext.o(.text+0x31): undefined reference to pthread_getspecific' /usr/X11R6/lib/libGL.a(glxext.o): In function__glXSetCurrentContext’:
glxext.o(.text+0x5a): undefined reference to pthread_key_create' glxext.o(.text+0x75): undefined reference topthread_setspecific’
/usr/X11R6/lib/libGL.a(glxext.o): In function __glXCloseDisplay': glxext.o(.text+0xc7): undefined reference toXextRemoveDisplay’
/usr/X11R6/lib/libGL.a(glxext.o): In function __glXFindDisplay': glxext.o(.text+0x14c): undefined reference toXextCreateExtension’
glxext.o(.text+0x16b): undefined reference to XextFindDisplay' glxext.o(.text+0x190): undefined reference toXextAddDisplay’
/usr/X11R6/lib/libGL.a(glxext.o): In function __glXInitialize': glxext.o(.text+0x78b): undefined reference toXMissingExtension’
/usr/X11R6/lib/libGL.a(dri_glx.o): In function OpenDriver': dri_glx.o(.text+0x297): undefined reference todlopen’
dri_glx.o(.text+0x2a6): undefined reference to dlerror' /usr/X11R6/lib/libGL.a(dri_glx.o): In functionFind_CreateScreenFuncs’:
dri_glx.o(.text+0x3a5): undefined reference to dlsym' dri_glx.o(.text+0x3d2): undefined reference todlclose’
/usr/X11R6/lib/libGL.a(dri_glx.o): In function driDestroyDisplay': dri_glx.o(.text+0x41f): undefined reference todlclose’
/usr/X11R6/lib/libGL.a(dri_glx.o): In function register_extensions_on_screen': dri_glx.o(.text+0x64a): undefined reference todlsym’
dri_glx.o(.text+0x65c): undefined reference to dlclose' /usr/X11R6/lib/libGL.a(glthread.o): In function_glthread_InitTSD’:
glthread.o(.text+0x21): undefined reference to pthread_key_create' /usr/X11R6/lib/libGL.a(glthread.o): In function_glthread_GetTSD’:
glthread.o(.text+0x75): undefined reference to pthread_getspecific' /usr/X11R6/lib/libGL.a(glthread.o): In function_glthread_SetTSD’:
glthread.o(.text+0xa8): undefined reference to pthread_setspecific' /usr/X11R6/lib/libGL.a(XF86dri.o): In functionfind_display’:
XF86dri.o(.text+0x14): undefined reference to XextCreateExtension' XF86dri.o(.text+0x30): undefined reference toXextFindDisplay’
XF86dri.o(.text+0x55): undefined reference to XextAddDisplay' /usr/X11R6/lib/libGL.a(XF86dri.o): In functionclose_display’:
XF86dri.o(.text+0x73): undefined reference to XextRemoveDisplay' /usr/X11R6/lib/libGL.a(XF86dri.o): In functionXF86DRIQueryVersion’:
XF86dri.o(.text+0xe6): undefined reference to XMissingExtension' /usr/X11R6/lib/libGL.a(XF86dri.o): In functionXF86DRIQueryDirectRenderingCapable’:
XF86dri.o(.text+0x1fa): undefined reference to XMissingExtension' /usr/X11R6/lib/libGL.a(XF86dri.o): In functionXF86DRIOpenConnection’:
XF86dri.o(.text+0x30a): undefined reference to XMissingExtension' /usr/X11R6/lib/libGL.a(XF86dri.o): In functionXF86DRIAuthConnection’:
XF86dri.o(.text+0x496): undefined reference to XMissingExtension' /usr/X11R6/lib/libGL.a(XF86dri.o): In functionXF86DRICloseConnection’:
XF86dri.o(.text+0x5ae): undefined reference to XMissingExtension' /usr/X11R6/lib/libGL.a(XF86dri.o)(.text+0x66e): more undefined references toXMissingExtension’ follow
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function find_display': XF86VMode.o(.text+0x14): undefined reference toXextCreateExtension’
XF86VMode.o(.text+0x30): undefined reference to XextFindDisplay' XF86VMode.o(.text+0x55): undefined reference toXextAddDisplay’
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function close_display': XF86VMode.o(.text+0x73): undefined reference toXextRemoveDisplay’
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function XF86VidModeQueryVersion':XF86VMode.o(.text+0xea): undefined reference toXMissingExtension’
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function XF86VidModeSetClientVersion': XF86VMode.o(.text+0x202): undefined reference toXMissingExtension’
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function XF86VidModeSetGamma': XF86VMode.o(.text+0x2ce): undefined reference toXMissingExtension’
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function XF86VidModeGetGamma': XF86VMode.o(.text+0x416): undefined reference toXMissingExtension’
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function XF86VidModeGetModeLine': XF86VMode.o(.text+0x55a): undefined reference toXMissingExtension’

going to sleep now…

ahh… looks like you arent linking to pthread. add -lpthread before the gl libs.

Run ‘make’ as root in the NVIDIA_GLX-1.0-2313 folder. This will clean up DRI and properly install nvidia’s proprietary libs. You have stale files from DRI (you’re linking against a GL static library from DRI).

“Run ‘make’ as root in the NVIDIA_GLX-1.0-2313 folder.”
Jeah, that helped. Working lika a charm

This is whatr it did:

Removing all old and conflicting files!
rm -f //usr/lib/libGL.*
rm -f //usr/lib/libGLcore.*
rm -f //usr/X11R6/lib/libGL.*
rm -f //usr/X11R6/lib/libGLcore.*
rm -f //usr/X11R6/lib/modules/extensions/libGLcore.*
rm -f //usr/X11R6/lib/modules/extensions/libglx.*
Installing new drivers
install usr/lib/libGL.so.1.0.2313 //usr/lib
install usr/lib/libGLcore.so.1.0.2313 //usr/lib
install usr/X11R6/lib/modules/drivers/nvidia_drv.o //usr/X11R6/lib/modules/drivers
install usr/X11R6/lib/modules/extensions/libglx.so.1.0.2313 //usr/X11R6/lib/modules/extensions
/sbin/ldconfig -n //usr/lib
cd //usr/lib/; ln -fs libGL.so.1.0.2313 libGL.so
cd //usr/X11R6/lib/modules/extensions;
ln -fs libglx.so.1.0.2313 libglx.so
Installing documentation in //usr/share/doc/NVIDIA_GLX-1.0
mkdir -p //usr/share/doc/NVIDIA_GLX-1.0/usr/include
cp -r usr/include/* //usr/share/doc/NVIDIA_GLX-1.0/usr/include
cp -r usr/share/doc/* //usr/share/doc/NVIDIA_GLX-1.0

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.