[plt-scheme] Embedding mzscheme on cygwin - linking problems

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Nov 10 12:00:32 EST 2005

At Tue, 08 Nov 2005 13:51:17 -0500, Ittai Balaban wrote:
> I'm trying to build a small C app that embeds mzscheme. No problems on
> Linux. On Windows, using cygwin, I've tried both the binary DrScheme
> distribution (299.400) and building my own from source. In either case I
> get link errors as follows:
> 
> ~> gcc embed-test.c -o embed-test
>    -I /usr/local/plt/include /usr/local/plt/lib/gcc/libmzgcxxxxxxx.lib
>    /usr/local/plt/lib/gcc/libmzschxxxxxxx.lib

I always have trouble remembering how Cygwin tools work...

After investigating, the answer seems to be: specify the ".dll" files
in the command line above, not the ".lib"s. That worked for me with
v299 and MSVC-built DLLs, at least.

When you build v299.x from scratch using gcc, you get a Unix-style
build, so the libraries should be in plt/lib, not plt/lib/gcc. For
v299.x, files in plt/lib/gcc are meant to support gcc-compiled
extensions for a Windows-style build.

The story was different for v209, where using gcc produced a
Windows-style build --- but there were lots of problems with that
arrangement.

Matthew



Posted on the users mailing list.