compile help

Hello as with many, I’m new to Linux but old to programming. I’ve set the system up, installed mesa-6.3.2, followed setup instructions,used make install which has put the lib files (which have installed into /usr/local/lib and headers to /usr/local/include/GL (is this right)).

I tried to compile using a simple make main in my projects directory. This contains a simple hello world programme. This works so I changed it to printf(“hello world %d”, GL_PROJECTION) and added #include <GL/gl.h>, this works so I know it’s using the header file.
Next I added a glMatrixMode(GL_PROJECTION); to test if the libary is being linked in. This produces

g++ -o main
/tmp/ccif6YAV.o(.text+0x25): In function ‘main’: reference to ‘glMatrixmode’
collect2: ld returned 1 exit status
main:*** [main] Error1

I’ve tried adding it to the path using
export PATH=/usr/local/lib:/usr/local/include/GL:/usr/bin (for compiler)

This has no effect, can anyone help please


try glMatrixMode instead of glMatrixmode…

Thanks found it have to use

g++ -o main -I/usr/local/include -L/usr/local/lib -LGL

Sorry I miss copied small m :s

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