linker error

I have tried to compile a demo program using gcc for Mesa/OpenGL on SUSE 7.0 and get the following linker error repeated for all the OPenGL functions:

/tmp/ccBYL07Z.o(.text+0x36): undefined reference to `glBegin’

I’ve tried to link to all the Mesa libraries I’ve got, however that does not seem to work.

Any ideas anyone?



I’ve found the answer. Don’t bother replying to this.