[gambit-list] Using compile-file and load on Windows

Marc Feeley feeley at iro.umontreal.ca
Thu Apr 17 17:41:32 EDT 2008


On 17-Apr-08, at 12:47 PM, Edward Tate wrote:

> The problems came when I tried to do this with a file "_W32Window.ss"
> which binds to the C files "W32Window.h" and "W32Window.c", which
> requires support from external libraries.
>
> The error I get is this (a few linker errors):
> C:\DOCUME~1\malune\LOCALS~1\Temp/ccMXbaaa.o:_W32Window.c:(.text 
> +0x6db):
> undefined reference to `SwapBuffers at 4'
> C:\DOCUME~1\malune\LOCALS~1\Temp/ccMXbaaa.o:_W32Window.c:(.text 
> +0x746):
> undefined reference to `ChoosePixelFormat at 8'
> C:\DOCUME~1\malune\LOCALS~1\Temp/ccMXbaaa.o:_W32Window.c:(.text 
> +0x775):
> undefined reference to `SetPixelFormat at 12'
> C:\DOCUME~1\malune\LOCALS~1\Temp/ccMXbaaa.o:_W32Window.c:(.text 
> +0x794):
> undefined reference to `wglCreateContext at 4'
> C:\DOCUME~1\malune\LOCALS~1\Temp/ccMXbaaa.o:_W32Window.c:(.text 
> +0x7bd):
> undefined reference to `wglMakeCurrent at 8'
> C:\DOCUME~1\malune\LOCALS~1\Temp/ccMXbaaa.o:_W32Window.c:(.text 
> +0x7f4):
> undefined reference to `wglMakeCurrent at 8'
> C:\DOCUME~1\malune\LOCALS~1\Temp/ccMXbaaa.o:_W32Window.c:(.text 
> +0x80b):
> undefined reference to `wglDeleteContext at 4'
> collect2: ld returned 1 exit status
>
> I've tried modifying gsc-cc-o.bat so that the libs included were the
> same as the gcc that worked under the command line: "-mno-cygwin
> -lmingw32 -lgdi32 -lopengl32 -lglu32 -lgambc". But this did not change
> the outcome of the problem.
>
> So basically I can link things statically without any problems because
> I'm calling gcc manually, but when I start to dynamically link things
> go wrong. Am I missing something obvious? Any thoughts would be highly
> appreciated.

Did you try specifying these options on the gsc command line?  For  
example:

   gsc -cc-options "-mno-cygwin" -ld-options "-lmingw32 -lgdi32 - 
lopengl32 -lglu32" _W32Window.ss

You don't need -lgambc, because that is already in gsi.

Marc




More information about the Gambit-list mailing list