more MSVCRT fun

Martin Wilck Martin.Wilck at
Wed Sep 18 02:03:30 CDT 2002

Am Die, 2002-09-17 um 21.47 schrieb steve.lustbader at

> In my winelib app, most of the cpp files use MSVCRT
> only, and thanks to Martin I've gotten those to compile.

If the small patches I sent make your app _run_ fine, too, please notify
me - I'll submit official. patches to Alexandre in that case.

> A couple of my source files, however, use a mix of MSVCRT
> and standard glibc (fork, exec, etc).  When I include unistd.h,
> lots of function definitions conflict with msvcrt/io.h.

It is new to me that fork() and exec() are supported on windows -
what kind of app are you porting?

>  How can
> I get this mix to compile?  Does the @ignore in the spec file
> trick from the Winelib user's guide still apply, or has it been
> changed (or removed altogether)?

Here's what I would try: Encapsulate the Unix-specific calls in
a separate source file(s) that compiles against the system headers,
wrap the Unix calls in functions exported by these files, and then
"simply" link the winelibwise and unixwise parts of your application.

Dividing the the two worlds over source files should  have other
benefits as well, softwaredesignwise :-)


Martin Wilck                Phone: +49 5251 8 15113
Fujitsu Siemens Computers   Fax:   +49 5251 8 20409
Heinz-Nixdorf-Ring 1	    mailto:Martin.Wilck at
D-33106 Paderborn 

More information about the wine-devel mailing list