I have seen people link GLUT with x86 assembly but when I tried it didn't work. It builds just fine but when I try to link it it just throws an error claiming that GLUT is undefined.
Does anyone know how to do that?
Building:
nasm -f win32 test.asm
Linking:
gcc test.obj -o test
Errors:
undefined reference to `glClear@4'
undefined reference to `glBegin@4'
undefined reference to `glColor3f@12'
undefined reference to `glVertex3f@12'
undefined reference to `glColor3f@12'
undefined reference to `glVertex3f@12'
undefined reference to `glColor3f@12'
undefined reference to `glVertex3f@12'
undefined reference to `glEnd@0'
undefined reference to `glFlush@0'
undefined reference to `glutInit@8'
undefined reference to `glutInitDisplayMode@4'
undefined reference to `glutInitWindowPosition@8'
undefined reference to `glutInitWindowSize@8'
undefined reference to `glutCreateWindow@4'
undefined reference to `glutDisplayFunc@4'
undefined reference to `glutMainLoop@0'
I use NASM to build and gcc to link.