Re: [ooc-compiler] Undefined reference from interface module
Brought to you by:
mva
|
From: Michael v. A. <Mic...@de...> - 2004-05-28 09:57:02
|
"August" <fus...@sp...> writes:
> 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)?
Use --verbose or -v to see the shell commands. The modules you
provide below should link against all three libraries.
-- mva
>
> 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.
|