Visual-MinGW: Winelib patch

Dimitrie O. Paun dpaun at
Tue Dec 31 17:18:09 CST 2002

On December 31, 2002 03:43 pm, Manu wrote:
> > that Visual-MinGW should not depend on cygwin, no? If so, it makes
> > sense to make this explicit with -mno-cygwin.
> If MinGW doesn't complain, I agree.

It shouldn't, it's documented to do so, try it out.

> -fvtable-thunks is problematic. I use gcc version 2.95.3-6 (mingw special),
> (faster, smaller binaries) -fvtable-thunks is required with gcc 2,
> but gcc 3 outputs a warning.
> Any workaround?

The best thing would be to determine the version of gcc dynamically
in the makefile, like so:

GCC_VER_2 := 'gcc version 2.'
CFLAGS = -mno-cygwin -W -Wall -fno-exceptions -fno-rtti
ifeq ($(findstring $(GCC_VER_2), $(shell gcc -v)),$(GCC_VER_2))
CFLAGS += -fvtable-thunks
ifeq ($(MAKECMDGOALS),debug)
CFLAGS += -g

This would require GNU make, but your current makefile requires
GNU make anyway, so... In this case, it would be better to
rename makefile -> Makefile, it's more standard for GNU make files.

> Visual-MinGW generates the right makefile indeed, from user
> parameters in the ".prj" file. There is three possibilities:
>  -
>  - > configure script.
>  - modifying params in ".prj" files.
> I will change the parameters in ".prj" files, then generated
> makefiles should work for both MinGW and Wine.
> Though, I don't have a solution for -fvtable-thunks.

There shouldn't be a any need for modifying parameters in .prj files.
Look, what we can do is this:

ifdef WINE
CC = winegcc
CXX = winegcc -xc++
WRES = wrc
CC = g++
WRES = windres

And then, to compile on Wine you just make sure you define WINE
before invoking make, like so:
  WINE=1 make
  make WINE=1

> About configuration files, I started a new project called
> MSYS Here, which is a MSYS loader. With it, MSYS can
> be launched from Windows Explorer, the same way than
> the "DOS Prompt Here" power toy.

Having a configure script can help, but let's get this one fixed
first. Once this works, we can look at the configuration stuff.


More information about the wine-devel mailing list