building programs

Vincent Béron vberon at
Fri Mar 4 19:24:50 CST 2005

Le ven 04/03/2005 à 19:41, Rob D a écrit :
> Is it the spec file that determines whether wine looks for main or WinMain?

No. If WinMain exists, it'll be used, even in the presence of main().

> The only info about spec files I could find was on page 20 of the winelib 
> guide (section 3.4.2), it says that it is very outdated and doesnt 
> currently describe winebuild and spec files.
> Besides that, it doesnt have enough information about what to call the 
> file, or how to link it into my project.

I don't think spec files for .exe are supported right now (sorry Ivan).

> Im thinking that this is why Im getting an unresolved reference to main 
> when I compile using winelib.

I guess you can't share the whole app. Could you then provide us with a
simple Makefile/.c file exhibiting the same problem?

I don't see any difference between using main() and WinMain() for a
"Hello, world!"-type app, on Linux.

The .o in which main() is compiled is on the final linking list, right?

Try modifying your Makefile so you pass -save-temps to winegcc while
building the final .so, that way it won't erase temp files (mainly
.spec.c, and .spec.i, .spec.s, .spec.o). Also play with -v (verbosity
level, can be additive).


More information about the wine-devel mailing list