dt
03-30-2006, 08:47 AM
I am running RedHat WS 4 Linux 64bit with a dual processor. However after a recent update my OpenGL code written in C++ no longer runs. I get the following error:
/usr/X11R6/lib64/libGL.a(glthread.o)(.text+0x17): In function `_glthread_InitTSD ':
: undefined reference to `pthread_key_create'
/usr/X11R6/lib64/libGL.a(glthread.o)(.text+0x55): In function `_glthread_GetTSD' :
: undefined reference to `pthread_getspecific'
/usr/X11R6/lib64/libGL.a(glthread.o)(.text+0x96): In function `_glthread_SetTSD' :
: undefined reference to `pthread_setspecific'
/usr/X11R6/lib64/libGL.a(glxext.o)(.text+0x15): In function `__glXGetCurrentCont ext':
: undefined reference to `pthread_key_create'
/usr/X11R6/lib64/libGL.a(glxext.o)(.text+0x37): In function `__glXGetCurrentCont ext':
: undefined reference to `pthread_getspecific'
/usr/X11R6/lib64/libGL.a(glxext.o)(.text+0x78): In function `__glXSetCurrentCont ext':
: undefined reference to `pthread_key_create'
/usr/X11R6/lib64/libGL.a(glxext.o)(.text+0x68): In function `__glXSetCurrentCont ext':
: undefined reference to `pthread_setspecific'
/usr/X11R6/lib64/libGL.a(glxext.o)(.text+0x8e): In function `__glXSetCurrentCont ext':
: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status
make: *** [SS] Error 1
My Makefile:
CXX=g++
CXXFLAGS=-g
OBJS=Main.o Viewer.o ArcBall.o
LIBS=-L/usr/X11R6/lib64 -lGLU -lGL -lgd -lXxf86vm
all: SS
SS: $(OBJS)
$(CXX) $(OBJS) -o $@ $(LIBS)
clean:
rm -f $(OBJS) Include files:
#include <stdio.h>
#include <sys/time.h>
#include <time.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
#include <X11/Xlib.h>
#include <X11/extensions/xf86vmode.h>
#include <X11/keysym.h>
#include <string.h>
#include <iostream.h>
#include <fstream.h>
#include "gd.h"
#include "Main.h"
#include "math.h"
#include "ArcBall.h"I have changed these library inclusion in the Makefile but to no avail. But still nothing seems to work. Please advise how I can fix this???
/usr/X11R6/lib64/libGL.a(glthread.o)(.text+0x17): In function `_glthread_InitTSD ':
: undefined reference to `pthread_key_create'
/usr/X11R6/lib64/libGL.a(glthread.o)(.text+0x55): In function `_glthread_GetTSD' :
: undefined reference to `pthread_getspecific'
/usr/X11R6/lib64/libGL.a(glthread.o)(.text+0x96): In function `_glthread_SetTSD' :
: undefined reference to `pthread_setspecific'
/usr/X11R6/lib64/libGL.a(glxext.o)(.text+0x15): In function `__glXGetCurrentCont ext':
: undefined reference to `pthread_key_create'
/usr/X11R6/lib64/libGL.a(glxext.o)(.text+0x37): In function `__glXGetCurrentCont ext':
: undefined reference to `pthread_getspecific'
/usr/X11R6/lib64/libGL.a(glxext.o)(.text+0x78): In function `__glXSetCurrentCont ext':
: undefined reference to `pthread_key_create'
/usr/X11R6/lib64/libGL.a(glxext.o)(.text+0x68): In function `__glXSetCurrentCont ext':
: undefined reference to `pthread_setspecific'
/usr/X11R6/lib64/libGL.a(glxext.o)(.text+0x8e): In function `__glXSetCurrentCont ext':
: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status
make: *** [SS] Error 1
My Makefile:
CXX=g++
CXXFLAGS=-g
OBJS=Main.o Viewer.o ArcBall.o
LIBS=-L/usr/X11R6/lib64 -lGLU -lGL -lgd -lXxf86vm
all: SS
SS: $(OBJS)
$(CXX) $(OBJS) -o $@ $(LIBS)
clean:
rm -f $(OBJS) Include files:
#include <stdio.h>
#include <sys/time.h>
#include <time.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
#include <X11/Xlib.h>
#include <X11/extensions/xf86vmode.h>
#include <X11/keysym.h>
#include <string.h>
#include <iostream.h>
#include <fstream.h>
#include "gd.h"
#include "Main.h"
#include "math.h"
#include "ArcBall.h"I have changed these library inclusion in the Makefile but to no avail. But still nothing seems to work. Please advise how I can fix this???