Re: winegcc: Use $(CC) for building generated .spec.c
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.
Hi,
I thought that gcc will figure the langauge based on the extension.
Under v3.3.2, given a file a.c containing int dwmain(int argc, char*argv) { return 1; } I get: [jon(a)home winegcc]$ gcc -c a.c && nm a.o 00000000 T dwmain [jon(a)home winegcc]$ g++ -c a.c && nm a.o 00000000 T _Z6dwmainiPc So it would appear not... Cheers, Jon ===== "Don't wait for the seas to part, or messiahs to come; Don't you sit around and waste this chance..." - Live jon_p_griffiths(a)yahoo.com __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/
participants (2)
-
Dimitrie O. Paun -
Jon Griffiths