[ooc-compiler] Undefined reference from interface module
Brought to you by:
mva
|
From: August <fus...@sp...> - 2004-05-28 01:12:18
|
I'm trying to port OpenGL and GLUT to OOC. I can successfully compile and
link the following(meaningless) C-program with `gcc
opengltest.c -lopengl32 -lglu32 -lglut32'.
opengltest.c
------------
#include <GL/glut.h>
int main(int argc, char *argv[])
{
glutMainLoop();
return 0;
}
When I try to compile `OpenGLTest.Mod' (shown below) with `oo2c -M -r ..
OpenGLTest.Mod' I get an error from the linker saying:
/home/adm/ob2/lib/obj/OpenGLTest.o(.text+0x35):OpenGLTest.c: undefined
reference to `glutMainLoop'
Any ideas? Is there a way to see what `gcc' command `oo2c' invokes (verbose
option or something)?
Thanks in advance,
August
Glut.Mod
----------
MODULE Glut [INTERFACE "C"; LINK LIB "opengl32"; LIB "glu32"; LIB "glut32"
END];
PROCEDURE ["glutMainLoop"] MainLoop*();
END Glut.
OpenGLTest.Mod
-------------------
MODULE OpenGLTest;
IMPORT Glut;
BEGIN
Glut.MainLoop();
END OpenGLTest.
|