[Mono-list] Building embed sample or cilc generated code on Windows

Candace Bain Candace_Bain@avid.com
Tue, 10 Jun 2003 16:54:54 -0500

I'm working on a proof of concept application that will need to call
from a C++ command line application into a C# object running under mono.
For performance testing I'll need to run the same app the same way on
both Linux and Windows.  I've been looking at the embed sample
application under /mono/samples/embed and the code that the cilc test
generates under /mcs/tools/cilc/generated, both of these work as
expected for me when I compile and run them on Linux.  I'm not able to
compile either of them on Windows.  The instructions for teste.c in
embed are to run:

gcc -o teste teste.c `pkg-config --cflags --libs mono` -lm

And the Makefile that cilc generates contains:

gcc -Wall -fpic -shared `pkg-config --cflags --libs glib-2.0 mono`
-lpthread *.c -o libdemo.so

If I run pkg-config --cflags --libs glib-2.0 mono manually it works and

-I/users/candace/install/lib/glib-2.0/include  -Wl,--export-dynamic
-LC:/cygwin/users/candace/install/lib -L/users/candace/install/lib
-lmono -lm -lgmodule-2.0 -lglib-2.0 -lintl -liconv

>From the errors I'm getting (can't find mono/io-layer/wapi.h, etc) it
seems clear to me that I need to use some specific header include paths
and defines for Windows, but I haven't been able to get a combination
that works yet.  Does anyone have a Makefile I could use to compile the
embed sample or cilc generated test on Windows, or if not does anyone
have pointers to where I could gather this information?

Best regards,