d3d8/tests: Use a borderless window for test_cursor_pos.
[wine.git] / tools / winegcc / winegcc.man.in
blobb4fc12d9926f6a2b96f804a8446b8ed54c630a7a
1 .TH WINEGCC 1 "October 2005" "@PACKAGE_STRING@" "Wine Developers Manual"
2 .SH NAME
3 winegcc \- Wine C and C++ MinGW Compatible Compiler
4 .SH SYNOPSIS
5 .B winegcc
6 .RI [ options "] " infile\fR...
7 .SH DESCRIPTION
8 .B winegcc 
9 is a gcc wrapper which tries to provide a MinGW compatible compiler 
10 under Linux. This is most useful to Win32 developers who can simply 
11 take their MinGW code from Windows, and recompile it without 
12 modifications under Winelib on Linux. 
13 wineg++ accepts mostly the same options as winegcc.
14 .PP
15 The goal of winegcc is to be able to simply replace gcc/g++/windres
16 with winegcc/wineg++/wrc in a MinGW Makefile, and just recompile
17 the application using Winelib under Wine. While typically there are 
18 small adjustments that must be made to the application source code 
19 and/or Makefile, it is quite easy to do them in a fashion that is
20 compatible between the MinGW and Wine environments.
21 .PP
22 This manual will document only the differences from gcc; please consult
23 the gcc manual for more information on those options.
24 .PP
25 .SH OPTIONS
26 .B gcc options:
27 All gcc options are supported, and are passed along to the backend
28 compiler.
29 .IP "\fB-B\fIprefix\fR"
30 This option specifies where to find the executables, libraries,
31 include files, and data files of the compiler itself. This is a 
32 standard gcc option that has been extended to recognize a 
33 \fIprefix\fR ending with '/tools/winebuild', in which case winegcc 
34 enters a special mode for building Wine itself. Developers should 
35 avoid prefixes ending with the magic suffix, or if that is not 
36 possible, simply express it differently, such as '/tools/winebuild/',
37 to avoid the special behaviour.
38 .IP \fB-fno-short-wchar\fR
39 Override the underlying type for wchar_t to be the default for the 
40 target, instead of using short unsigned int, which is the default 
41 for Win32.
42 .IP \fB-mconsole\fR
43 This option passes '--subsystem console' to winebuild, to build
44 console applications. It is the default.
45 .IP \fB-mno-cygwin\fR
46 Use Wine implementation of MSVCRT, instead of linking against
47 the host system libc. This is necessary for the vast majority
48 of Win32 applications, as they typically depend on various features
49 of MSVCRT. This switch is also used by the MinGW compiler to link
50 against MSVCRT on Windows, instead of linking against Cygwin
51 libc. Sharing the syntax with MinGW makes it very easy to write 
52 Makefiles that work under Wine, MinGW+MSYS, or MinGW+Cygwin.
53 .IP \fB-municode\fR
54 Set the default entry point of the application to be the Unicode
55 \fBwmain()\fR instead of the standard \fBmain()\fR.
56 .IP \fB-mwindows\fR
57 This option adds -lgdi32, -lcomdlg32, and -lshell32 to the list of
58 default libraries, and passes '--subsystem windows' to winebuild
59 to build graphical applications.
60 .IP \fB-nodefaultlibs\fR
61 Do not use the standard system libraries when linking. These
62 include at a minimum -lkernel32, -luser32, -ladvapi32, and 
63 any default libraries used by the backend compiler. The -mwindows
64 option augments the list of default libraries as described above.
65 .IP \fB-nostartfiles\fR
66 Do not add the winecrt0 library when linking.
67 .IP \fB-Wb,\fIoption\fR
68 Pass an option to winebuild.  If \fIoption\fR contains
69 commas, it is split into multiple options at the commas.
70 .SH ENVIRONMENT
71 .TP
72 .B WINEBUILD
73 Specifies the path and name of the \fBwinebuild\fR binary that will be
74 launched automatically by \fBwinegcc\fR.
75 If not set, \fBwinegcc\fR will look for a file named \fIwinebuild\fR
76 in the path.
77 .SH DEFINES
78 winegcc defines __WINE__, for code that needs to know when it is
79 being compiled under Wine. It also defines WIN32, _WIN32, __WIN32, 
80 __WIN32__, __WINNT, and __WINNT__ for compatibility with MinGW.
81 .SH BUGS
82 The dllimport/dllexport attributes are not supported at the moment,
83 due to lack of support for these features in the ELF version of gcc.
84 .PP
85 Static linking is not currently supported against Wine DLLs. As a
86 result, the -static, --static, and -Wl,-static options will generate
87 an error.
88 .PP
89 Bugs can be reported on the
90 .UR http://bugs.winehq.org
91 .B Wine bug tracker
92 .UE .
93 .SH AUTHORS
94 .B winegcc
95 was written by Dimitrie O. Paun.
96 .SH AVAILABILITY
97 .B winegcc
98 is part of the Wine distribution, which is available through WineHQ,
99 the
100 .UR http://www.winehq.org/
101 .B Wine development headquarters
102 .UE .
103 .SH "SEE ALSO"
104 .BR gcc (1),
105 .BR winebuild (1),
106 .BR wrc (1),
107 .BR wine (1),
109 .UR http://www.winehq.org/help
110 .B Wine documentation and support
111 .UE .