1 .TH WINEGCC 1 "January 2005" "Wine Manpage" "Wine Developers Manual"
3 winegcc \- Wine C and C++ MinGW Compatible Compiler
5 .BR "winegcc "\fI[options]\fR " \fIinfile\fR"...
8 is a gcc wrapper which tries to provide a MinGW compatible compiler
9 under Linux. This is most useful to Win32 developers who can simply
10 take their MinGW code from Windows, and recompile it without
11 modifications under Winelib on Linux.
12 wineg++ accepts mostly the same options as winegcc.
14 The goal of winegcc is to be able to simply replace gcc/g++/windres
15 with winegcc/wineg++/wrc in a MinGW Makefile, and just recompile
16 the application using Winelib under Wine. While typically there are
17 small adjustments that must be made to the application source code
18 and/or Makefile, it is quite easy to do them in a fashion that is
19 compatible between the MinGW and Wine environments.
21 This manual will document only the differences from gcc; please consult
22 the gcc manual for more information on those options.
26 All gcc options are supported, and are passed along to the backend
28 .IP "\fB-B\fIprefix\fR"
29 This option specifies where to find the executables, libraries,
30 include files, and data files of the compiler itself. This is a
31 standard gcc option that has been extended to recognize a
32 \fIprefix\fR ending with '/tools/winebuild', in which case winegcc
33 enters a special mode for building Wine itself. Developers should
34 avoid prefixes ending with the magic suffix, or if that is not
35 possible, simply express it differently, such as '/tools/winebuild/',
36 to avoid the special behaviour.
37 .IP \fB-fno-short-wchar\fR
38 Override the underlying type for wchar_t to be the default for the
39 target, instead of using short unsigned int, which is the default
42 This option passes '--subsystem console' to winebuild, to build
43 console applications. It is the default.
45 Use Wine's implementation of MSVCRT, instead of linking against
46 the host system's libc. This is necessary for the vast majority
47 of Win32 applications, as they typically depend on various features
48 of MSVCRT. This switch is also used by the MinGW compiler to link
49 against MSVCRT on Windows, instead of linking against Cygwin's
50 libc. Sharing the syntax with MinGW makes it very easy to write
51 Makefiles that work under Wine, MinGW+MSYS, or MinGW+Cygwin.
53 This option adds -lgdi32, -lcomdlg32, and -lshell32 to the list of
54 default libraries, and passes '--subsystem windows' to winebuild
55 to build graphical applications.
56 .IP \fB-nodefaultlibs\fR
57 Do not use the standard system libraries when linking. These
58 include at a minimum -lkernel32, -luser32, -ladvapi32, and
59 any default libraries used by the backend compiler. The -mwindows
60 option augments the list of default libraries as described above.
62 Pass option as an option to winebuild. If option contains
63 commas, it is split into multiple options at the commas.
65 winegcc defines __WINE__, for code that needs to know when it is
66 being compiled under Wine. It also defines WIN32, _WIN32, __WIN32,
67 __WIN32__, __WINNT, and __WINNT__ for compatibility with MinGW.
69 The dllimport/dllexport attributes are not supported at the moment,
70 due to lack of support for these features in the ELF version of gcc.
72 Static linking is not currently supported against Wine's DLL. As a
73 result, the -static, --static, and -Wl,-static options will generate
77 was written by Dimitrie O. Paun.
83 .BR "Winelib User Guide",
84 .BR "Wine Developers Guide".