winegcc.man.in 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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,--target \fItarget\fR"
  30. Specify the target architecture triplet for cross-compiling. winegcc
  31. will then invoke \fItarget\fR-gcc instead of gcc.
  32. .IP "\fB--wine-objdir \fIdir\fR"
  33. Specify the Wine object directory. This is used when building Wine
  34. itself, to use the includes and libraries from inside the build tree.
  35. .IP "\fB--winebuild \fIname\fR"
  36. Specifies the path and name of the \fBwinebuild\fR binary that will be
  37. launched automatically by \fBwinegcc\fR. If not set, \fBwinegcc\fR
  38. will look for a file named \fIwinebuild\fR in the path. This takes
  39. precedence over the \fBWINEBUILD\fR environment variable.
  40. .IP \fB-fno-short-wchar\fR
  41. Override the underlying type for wchar_t to be the default for the
  42. target, instead of using short unsigned int, which is the default
  43. for Win32.
  44. .IP \fB-mconsole\fR
  45. This option passes '--subsystem console' to winebuild, to build
  46. console applications. It is the default.
  47. .IP \fB-mno-cygwin\fR
  48. Use Wine implementation of MSVCRT, instead of linking against
  49. the host system libc. This is necessary for the vast majority
  50. of Win32 applications, as they typically depend on various features
  51. of MSVCRT. This switch is also used by the MinGW compiler to link
  52. against MSVCRT on Windows, instead of linking against Cygwin
  53. libc. Sharing the syntax with MinGW makes it very easy to write
  54. Makefiles that work under Wine, MinGW+MSYS, or MinGW+Cygwin.
  55. .IP \fB-municode\fR
  56. Set the default entry point of the application to be the Unicode
  57. \fBwmain()\fR instead of the standard \fBmain()\fR.
  58. .IP \fB-mwindows\fR
  59. This option adds -lgdi32, -lcomdlg32, and -lshell32 to the list of
  60. default libraries, and passes '--subsystem windows' to winebuild
  61. to build graphical applications.
  62. .IP \fB-munix\fR
  63. Set when building the Unix counterpart of a builtin module.
  64. .IP \fB-nodefaultlibs\fR
  65. Do not use the standard system libraries when linking. These
  66. include at a minimum -lkernel32, -luser32, -ladvapi32, and
  67. any default libraries used by the backend compiler. The -mwindows
  68. option augments the list of default libraries as described above.
  69. .IP \fB-nostartfiles\fR
  70. Do not add the winecrt0 library when linking.
  71. .IP \fB-Wb,\fIoption\fR
  72. Pass an option to winebuild. If \fIoption\fR contains
  73. commas, it is split into multiple options at the commas.
  74. .IP \fB-Wl,--out-implib,\fIlib.a\fR
  75. When linking a dll, also create its corresponding import library.
  76. .SH ENVIRONMENT
  77. .TP
  78. .B WINEBUILD
  79. Specifies the path and name of the \fBwinebuild\fR binary that will be
  80. launched automatically by \fBwinegcc\fR. If not set, \fBwinegcc\fR
  81. will look for a file named \fIwinebuild\fR in the path.
  82. .SH DEFINES
  83. winegcc defines __WINE__, for code that needs to know when it is
  84. being compiled under Wine. It also defines WIN32, _WIN32, __WIN32,
  85. __WIN32__, __WINNT, and __WINNT__ for compatibility with MinGW.
  86. .SH BUGS
  87. The dllimport/dllexport attributes are not supported at the moment,
  88. due to lack of support for these features in the ELF version of gcc.
  89. .PP
  90. Static linking is not currently supported against Wine DLLs. As a
  91. result, the -static, --static, and -Wl,-static options will generate
  92. an error.
  93. .PP
  94. Bugs can be reported on the
  95. .UR https://bugs.winehq.org
  96. .B Wine bug tracker
  97. .UE .
  98. .SH AUTHORS
  99. .B winegcc
  100. was written by Dimitrie O. Paun.
  101. .SH AVAILABILITY
  102. .B winegcc
  103. is part of the Wine distribution, which is available through WineHQ,
  104. the
  105. .UR https://www.winehq.org/
  106. .B Wine development headquarters
  107. .UE .
  108. .SH "SEE ALSO"
  109. .BR gcc (1),
  110. .BR winebuild (1),
  111. .BR wrc (1),
  112. .BR wine (1),
  113. .br
  114. .UR https://www.winehq.org/help
  115. .B Wine documentation and support
  116. .UE .