Linux compilation problem

HI!
I’m trying to compile the Nehe code in my linux box. But the Makefile isn’t working.
It shows follwing error:

[dddd@localhost lesson05]$ ./Makefile
./Makefile: CC: command not found
./Makefile: all:: command not found
./Makefile: CC: command not found
./Makefile: lesson05.c: command not found
./Makefile: clean:: command not found
./Makefile: @echo: command not found
./Makefile: @rm: command not found
./Makefile: @echo: command not found
[mishuk@localhost lesson05]$

It also creating error with every gl command as unidentified variable or function.

I think may be there is some problem in my environment variable of my system.

How to fix it…?? How can i fix environment variable problem…anyother openion is highly requested…

Thank you
Mishuk

This is really more of a Linux problem than an OpenGL problem.

Just type “make”.

Thanks.
You are right…it was my mistake…
But now i’m facing another problem…
My code is not compiling…

I tried to compile Nehe lesson05 of GLX version

Here is error:

How can i solve it??
Please help me

###############################################

[mishuk@localhost lesson05]$ make
gcc -Wall -pedantic -ansi lesson05.c -o lesson05 -L/usr/X11R6/lib -lGL -lGLU -lX11 -lXxf86vm
lesson05.c: In function main': lesson05.c:375: warning: implicit declaration of functionexit’
/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+0x6a): undefined reference to pthread_key_create' glxext.o(.text+0x87): undefined reference topthread_setspecific’
/usr/X11R6/lib/libGL.a(glxext.o): In function __glXFindDisplay': glxext.o(.text+0x175): undefined reference toXextCreateExtension’
glxext.o(.text+0x192): undefined reference to XextFindDisplay' glxext.o(.text+0x1b8): undefined reference toXextAddDisplay’
/usr/X11R6/lib/libGL.a(glxext.o): In function __glXInitialize': glxext.o(.text+0x7fe): undefined reference toXMissingExtension’
/usr/X11R6/lib/libGL.a(glxext.o): In function __glXCloseDisplay': glxext.o(.text+0xdd): undefined reference toXextRemoveDisplay’
/usr/X11R6/lib/libGL.a(glthread.o): In function _glthread_InitTSD': glthread.o(.text+0x1e): undefined reference topthread_key_create’
/usr/X11R6/lib/libGL.a(glthread.o): In function _glthread_GetTSD': glthread.o(.text+0x76): undefined reference topthread_getspecific’
/usr/X11R6/lib/libGL.a(glthread.o): In function _glthread_SetTSD': glthread.o(.text+0xbf): undefined reference topthread_setspecific’
/usr/X11R6/lib/libGL.a(XF86dri.o): In function find_display': XF86dri.o(.text+0x14): undefined reference toXextCreateExtension’
XF86dri.o(.text+0x31): undefined reference to XextFindDisplay' XF86dri.o(.text+0x57): undefined reference toXextAddDisplay’
/usr/X11R6/lib/libGL.a(XF86dri.o): In function XF86DRIQueryVersion': XF86dri.o(.text+0xfd): undefined reference toXMissingExtension’
/usr/X11R6/lib/libGL.a(XF86dri.o): In function XF86DRIQueryDirectRenderingCapable': XF86dri.o(.text+0x21d): undefined reference toXMissingExtension’
/usr/X11R6/lib/libGL.a(XF86dri.o): In function XF86DRIOpenConnection': XF86dri.o(.text+0x331): undefined reference toXMissingExtension’
/usr/X11R6/lib/libGL.a(XF86dri.o): In function XF86DRIAuthConnection': XF86dri.o(.text+0x4cd): undefined reference toXMissingExtension’
/usr/X11R6/lib/libGL.a(XF86dri.o): In function XF86DRICloseConnection': XF86dri.o(.text+0x5ed): undefined reference toXMissingExtension’
/usr/X11R6/lib/libGL.a(XF86dri.o)(.text+0x6b1): more undefined references to XMissingExtension' follow /usr/X11R6/lib/libGL.a(XF86dri.o): In functionclose_display’:
XF86dri.o(.text+0x88): undefined reference to XextRemoveDisplay' /usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In functionfind_display’:
XF86VMode.o(.text+0x14): undefined reference to XextCreateExtension' XF86VMode.o(.text+0x31): undefined reference toXextFindDisplay’
XF86VMode.o(.text+0x57): undefined reference to XextAddDisplay' /usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In functionXF86VidModeQueryVersion’:
XF86VMode.o(.text+0x101): undefined reference to XMissingExtension' /usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In functionXF86VidModeSetClientVersion’:
XF86VMode.o(.text+0x22d): undefined reference to XMissingExtension' /usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In functionXF86VidModeSetGamma’:
XF86VMode.o(.text+0x301): undefined reference to XMissingExtension' /usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In functionXF86VidModeGetGamma’:
XF86VMode.o(.text+0x431): undefined reference to XMissingExtension' /usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In functionXF86VidModeGetModeLine’:
XF86VMode.o(.text+0x583): undefined reference to XMissingExtension' /usr/X11R6/lib/libXxf86vm.a(XF86VMode.o)(.text+0x819): more undefined references toXMissingExtension’ follow
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function close_display': XF86VMode.o(.text+0x88): undefined reference toXextRemoveDisplay’
/usr/lib/gcc-lib/i386-redhat-linux/2.96/libgcc.a(_eh.o): In function eh_context_free': /usr/src/build/87732-i386/BUILD/gcc-2.96-20000731/obj-i386-redhat-linux/gcc/../../gcc/libgcc2.c(.text+0x114): undefined reference topthread_setspecific’
/usr/lib/gcc-lib/i386-redhat-linux/2.96/libgcc.a(_eh.o): In function eh_threads_initialize': /usr/src/build/87732-i386/BUILD/gcc-2.96-20000731/obj-i386-redhat-linux/gcc/../../gcc/libgcc2.c(.text+0x231): undefined reference topthread_key_create’
/usr/lib/gcc-lib/i386-redhat-linux/2.96/libgcc.a(_eh.o): In function eh_context_specific': /usr/src/build/87732-i386/BUILD/gcc-2.96-20000731/obj-i386-redhat-linux/gcc/../../gcc/libgcc2.c(.text+0x38b): undefined reference topthread_getspecific’
/usr/src/build/87732-i386/BUILD/gcc-2.96-20000731/obj-i386-redhat-linux/gcc/…/…/gcc/libgcc2.c(.text+0x3ab): undefined reference to `pthread_setspecific’
collect2: ld returned 1 exit status
make: *** [all] Error 1
[mishuk@localhost lesson05]$

Looks like a failure to load libpthread. I suggest you look into the Makefile, and add “-lpthread” to the argument set where the object files are linked.

You have another option, download the QT C/C++ gui interface from www.trolltech.com

Easy to setup and start writting OpenGL programs, don’t have to worry about making manual make files.

I think it still comes with Redhat linux, so you can also download Redhat and it will be installed with all the openGL librarys.