WINEGCC(1)

πŸ“¦
version 10.0 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ‘‘ 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 from gcc. for everything else, go consult the gcc manual, bestie. it's all there.

πŸ’– OPTIONS πŸ’–

  • gcc options β€” every single gcc option is supported, and they all get passed along to the backend compiler. every last one. periodt.
  • -b, --target target β€” specify the target architecture triplet for cross-compiling. when you do, winegcc will invoke target-gcc instead of plain old gcc. πŸ’«
  • --wine-objdir dir β€” 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. πŸŽ€
  • --winebuild name β€” specifies the path and name of the winebuild binary that winegcc will launch automatically. if you don't set it, winegcc will go looking for a file named winebuild in the path. oh and β€” this takes precedence over the WINEBUILD environment variable. queen behavior, it gets first say. πŸ‘‘
  • -fno-short-wchar β€” overrides the underlying type for wchar_t to be the default for the target, instead of using short unsigned int, which is the default for Win32. switching it up fr fr.
  • -mconsole β€” passes '--subsystem console' to winebuild, 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 Unicode wmain() instead of the standard main().
  • -mwindows β€” this one adds -lgdi32, -lcomdlg32, and -lshell32 to the list of default libraries, and passes '--subsystem windows' to winebuild so 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 -mwindows option augments the list of default libraries as described above, so watch out. πŸ™ˆ
  • -nostartfiles β€” do not add the winecrt0 library when linking.
  • -Wb,option β€” pass an option to winebuild. 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 the winebuild binary that will be launched automatically by winegcc. if not set, winegcc will look for a file named winebuild in 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 πŸ’€

the dllimport/dllexport attributes are not supported at the moment, due to lack of support for these features in the ELF version of gcc. 😭
static linking is not currently supported against Wine DLLs. as a result, the -static, --static, and -Wl,-static options 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. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά