WINEGCC(1)
π NAME π
okay so bestie, meet winegcc β the Wine C and C++ MinGW Compatible Compiler. that's the whole vibe. it's the manual page for it (that's the (1) in WINEGCC(1) btw, in case the section number was living rent-free in your head). π
π¦ SYNOPSIS π¦
winegcc [options] infile...
β¨ DESCRIPTION β¨
so winegcc is a gcc wrapper that tries really hard to give you a MinGW-compatible compiler while you're sitting on Linux. and like β that is so useful for Win32 devs, because you can literally take your MinGW code straight off Windows and recompile it with zero modifications under Winelib on Linux. no cap. and wineg++ accepts mostly the same options as winegcc, so the energy carries over. π«Ά
the whole goal of winegcc is to be a drop-in replacement: swap gcc/g++/windres for winegcc/wineg++/wrc in a MinGW Makefile and just recompile the app using Winelib under Wine. is it always that easy? ngl, typically there are small adjustments you'll have to make to the application source code and/or the Makefile β but it's quite easy to do them in a way that plays nice with both the MinGW and Wine environments. main character energy, honestly. β¨
heads up: this manual only documents the differences fromgcc. for everything else, go consult thegccmanual, bestie. it's all there.
π OPTIONS π
- gcc options β every single
gccoption is supported, and they all get passed along to the backend compiler. every last one. periodt. -b,--targettarget β specify the target architecture triplet for cross-compiling. when you do,winegccwill invoketarget-gccinstead of plain oldgcc. π«--wine-objdirdir β specify the Wine object directory. this is what you use when you're building Wine itself, so it pulls the includes and libraries from inside the build tree. π--winebuildname β specifies the path and name of thewinebuildbinary thatwinegccwill launch automatically. if you don't set it,winegccwill go looking for a file namedwinebuildin the path. oh and β this takes precedence over theWINEBUILDenvironment variable. queen behavior, it gets first say. π-fno-short-wcharβ overrides the underlying type forwchar_tto be the default for the target, instead of usingshort unsigned int, which is the default for Win32. switching it up fr fr.-mconsoleβ passes'--subsystem console'towinebuild, so you can build console applications. and guess what β it's the default. iconic.-mno-cygwinβ use the Wine implementation of MSVCRT, instead of linking against the host system libc. this is necessary for the vast majority of Win32 applications, since 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. slay. π₯-municodeβ sets the default entry point of the application to be the Unicodewmain()instead of the standardmain().-mwindowsβ this one adds-lgdi32,-lcomdlg32, and-lshell32to the list of default libraries, and passes'--subsystem windows'towinebuildso you can build graphical applications. windowed mode activated. π-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. and the-mwindowsoption augments the list of default libraries as described above, so watch out. π-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's being compiled under Wine. π·
it also defines WIN32, _WIN32, __WIN32, __WIN32__, __WINNT, and __WINNT__ for compatibility with MinGW. that's a lot of defines but she's thorough. π
π BUGS π
thedllimport/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. do not try it. it will not go well. π
bugs can be reported on the Wine bug tracker. π
π AUTHORS π
winegcc was written by Dimitrie O. Paun. ty for your service. π«Ά
β 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 page, bestie!! this was Wine 10.0, dated October 2005 β the manual name was WINEGCC(1) the whole time, she was just hiding in the header. go forth and compile. πβ¨ππ¦πΈπ
π«Ά
π¦ where this page comes from
- debian trixie: wine64-tools 10.0~repack-6 Β· LGPL-2.1-or-later
- ubuntu questing: wine64-tools 10.0~repack-6ubuntu1
- ubuntu resolute: wine64-tools 10.0~repack-12ubuntu1 Β· LGPL-2.1-or-later
- ubuntu stonking: wine64-tools 10.0~repack-12ubuntu1 Β· 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