WINEGCC(1)
π WINEGCC(1) β the Wine Developers Manual glow-up π
okay bestie, sit down, hydrate, because we're talking about winegcc β your Wine C and C++ MinGW Compatible Compiler. she's from the Wine Developers Manual and she's here to let you compile Windows-ish code on Linux without losing your mind. periodt. π
β¨ NAME β¨
winegcc β the Wine C and C++ MinGW Compatible Compiler. π
πΈ SYNOPSIS πΈ
winegcc [options] infile...
π¦ DESCRIPTION π¦
so like, winegcc is a gcc wrapper that tries to give you a MinGW compatible compiler under Linux. literally her whole thing. this is most useful to Win32 developers who can just grab their MinGW code from Windows and recompile it without modifications under Winelib on Linux. no cap. and heads up: wineg++ accepts mostly the same options as winegcc, she's just the C++ sister. π
the goal of winegcc is to be able to simply replace gcc/g++/windres with winegcc/wineg++/wrc in a MinGW Makefile, and just recompile the application using Winelib under Wine. the way that works is chef's kiss. while typically there are small adjustments that must be made to the application source code and/or Makefile, it is quite easy to do them in a fashion that is compatible between the MinGW and Wine environments. lowkey iconic.
this manual will document only the differences from gcc; please consult the gcc manual for more information on those options. iykyk. π
π OPTIONS π
- gcc options: All
gccoptions are supported, and are passed along to the backend compiler. she's not gatekeeping, she forwards everything. π«Ά
-b,--targettarget β Specify the target architecture triplet for cross-compiling.winegccwill then invoketarget-gccinstead ofgcc. π―--wine-objdirdir β Specify the Wine object directory. This is used when building Wine itself, to use the includes and libraries from inside the build tree. π³--winebuildname β Specifies the path and name of thewinebuildbinary that will be launched automatically bywinegcc. If not set,winegccwill look for a file namedwinebuildin the path. This takes precedence over theWINEBUILDenvironment variable. β οΈ (yes, she said takes precedence, remember that)-fno-short-wcharβ Override the underlying type forwchar_tto be the default for the target, instead of usingshort unsigned int, which is the default for Win32. β¨-mconsoleβ This option passes'--subsystem console'towinebuild, to build console applications. It is the default. π₯οΈ-mno-cygwinβ Use Wine implementation of MSVCRT, instead of linking against the host system libc. This is necessary for the vast majority of Win32 applications, as they typically depend on various features of MSVCRT. This switch is also used by the MinGW compiler to link against MSVCRT on Windows, instead of linking against Cygwin libc. Sharing the syntax with MinGW makes it very easy to write Makefiles that work under Wine, MinGW+MSYS, or MinGW+Cygwin. π₯-municodeβ Set the default entry point of the application to be the Unicodewmain()instead of the standardmain(). π-mwindowsβ This option adds-lgdi32,-lcomdlg32, and-lshell32to the list of default libraries, and passes'--subsystem windows'towinebuildto build graphical applications. πͺ-munixβ Set when building the Unix counterpart of a builtin module. π§-nodefaultlibsβ Do not use the standard system libraries when linking. These include at a minimum-lkernel32,-luser32,-ladvapi32, and any default libraries used by the backend compiler. The-mwindowsoption augments the list of default libraries as described above. π«π-nostartfilesβ Do not add thewinecrt0library when linking. π-Wb,option β Pass an option towinebuild. If option contains commas, it is split into multiple options at the commas. π°-Wl,--out-implib,lib.a β When linking a dll, also create its corresponding import library. π¦
π ENVIRONMENT π
WINEBUILDβ Specifies the path and name of thewinebuildbinary that will be launched automatically bywinegcc. If not set,winegccwill look for a file namedwinebuildin the path. π
π DEFINES π
winegcc defines __WINE__, for code that needs to know when it is being compiled under Wine. it also defines WIN32, _WIN32, __WIN32, __WIN32__, __WINNT, and __WINNT__ for compatibility with MinGW. so many little nicknames, she's a social butterfly fr fr. π¦
π BUGS π
okay so the not-so-cute part, but we don't hide things here:
- The
dllimport/dllexportattributes are not supported at the moment, due to lack of support for these features in the ELF version ofgcc. π - Static linking is not currently supported against Wine DLLs. As a result, the
-static,--static, and-Wl,-staticoptions will generate an error. π₯
bestie, do not try to sneak -static in there, she WILL error at you. not a vibe.
Bugs can be reported on the Wine bug tracker. π
π AUTHORS π
winegcc was written by Dimitrie O. Paun. respect the icon. β¨
β AVAILABILITY β
winegcc is part of the Wine distribution, which is available through WineHQ, the Wine development headquarters. π°
π SEE ALSO π
gcc(1), winebuild(1), wrc(1), wine(1), Wine documentation and support.
and that's the whole thing, bestie π this page came straight from Wine 6.0, dated October 2005 β oldie but a total main character. now go compile something cute, WINEGCC(1) forever πΈπ«Άπ
π¦ where this page comes from
- ubuntu jammy: wine64-development-tools 6.0+repack-1ubuntu1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms