[Mono-list] strange mono initialization problem

John Sohn jsohn@columbus.rr.com
24 Aug 2002 03:55:28 -0400

> > #include <gc/gc.h>
> > #include <windows.h>
> > #include <stdio.h>
> > 
> > int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
> >                     LPSTR lpszCmdLine, int nCmdShow)
> > {
> >         void* test = NULL;
> >         printf("start\n");
> >         test = GC_malloc(1);
> >         printf("end\n");
> > }
> How do I compile/link such app? Just adding -lwine complains about the
> missing main function (man, I'm so glad I never had to work with the
> windows API!).
> Once we can compile the app, we'll try to pin down the issue.

I'm using the latest Wine snapshot release (wine-20020804). If you put
this file in it's own directory (with a .c extension) and run
"winemaker  ." it will create a configure/makefile project for you. You
can then ./configure;make to build the project. Of course you will also
need to add the garbage collection library to the makefile.

There was a problem with the winemaker in this snapshot release but it
has been fixed in the latest Wine from CVS. You do not need to download
the whole project from CVS to get this update though. I downloaded the
file directly from: