winegcc: Use $(CC) for building generated .spec.c

Dimitrie O. Paun dpaun at rogers.com
Tue May 25 10:32:32 CDT 2004


On Tue, May 25, 2004 at 12:56:27AM -0700, Jon Griffiths wrote:
> Building and linking a C++ dll to a Winelib app currently fails using
> winegcc as it will use $(CXX) to compile the .spec.c file. This means
> it won't link correctly to libwine.so due to the name mangling. I
> tried 2 solutions: changing winebuild to generate extern "C" {}
> declarations where needed, and changing winegcc to use $(CC) instead.
> Of the two, I think the latter is neater. The following patch
> implements it.

I thought that gcc will figure the langauge based on the extension.
So g++ file.c would actually compile as a C file... But this may not
work for other compilers. We could do it ourselves in compile(),
choose $CC or $CXX based on the extension. However, I'm not sure it's
better than your solution. In fact, it's a lot more risky.

-- 
Dimi.



More information about the wine-devel mailing list