Jump to content
  • Advertisement
Sign in to follow this  
DuneSoldier

Linux/GLX Tutorials Ubuntu

This topic is 4772 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was doing the NeHe tutorials on Debian Unstable back when it still used XF86. I only went as far as Tutorial 6 before I was bogged down with other things. Now I'm looking to pick them back up on my new laptop running Ubuntu "Hoary" and download lesson 1 linux/glx for review. However when I use the make command I get this output:
gcc -Wall -pedantic -ansi lesson01.c -o lesson01 -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm
lesson01.c: In function `main':
lesson01.c:295: warning: implicit declaration of function `exit'
/usr/X11R6/lib/libGL.a(glxext.o)(.text+0x2f): In function `__glXGetCurrentContext':
: undefined reference to `pthread_key_create'
/usr/X11R6/lib/libGL.a(glxext.o)(.text+0x53): In function `__glXGetCurrentContext':
: undefined reference to `pthread_getspecific'
/usr/X11R6/lib/libGL.a(glxext.o)(.text+0x93): In function `__glXSetCurrentContext':
: undefined reference to `pthread_setspecific'
/usr/X11R6/lib/libGL.a(glxext.o)(.text+0xb0): In function `__glXSetCurrentContext':
: undefined reference to `pthread_key_create'
/usr/X11R6/lib/libGL.a(glthread.o)(.text+0x46): In function `_glthread_InitTSD':: undefined reference to `pthread_key_create'
/usr/X11R6/lib/libGL.a(glthread.o)(.text+0xaa): In function `_glthread_GetTSD':
: undefined reference to `pthread_getspecific'
/usr/X11R6/lib/libGL.a(glthread.o)(.text+0xf0): In function `_glthread_SetTSD':
: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status
make: *** [all] Error 1
Any Suggestions?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
It seems to be a problem with the pthread library; have you (correctly) installed pthread dev libraries? If you have installed them manually(configure, make, make install) check that the installation path is in the LD_LIBRARY_PATH environment variable and if it isn't so update that variable or the configuration file ld.so.conf

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
A better look to your command line showed me that you haven't included the pthread library, to do this add -lpthread to the command line; this should fix it...obviously you have to have the library installed in your machine (search pthread-dev with synaptic)

Share this post


Link to post
Share on other sites
I fixed the problem. I didn't have nvidia-glx-dev installed under ubuntu, just the nvidia-glx package. Sorry to bother you, but I guess that's what happens when you're bouncing between programming and sleep.

Thanks everyone.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!