From: Napoleon A. <nah...@so...> - 2002-09-10 12:57:43
|
Hi, First of all let me appologise if this is not the right place for this = thread. My only reason for posting is that the problem arises only when = I compile with the latest mingw hence my thinking that may be it has = something to do with MingW. I have just downloaded and installed the latest mingw 2.0.0-3. =20 I have this problem though with a project which hither to compiled = without errors. Below are the error messages: Building Makefile: "C:\Projects\WinCalcK\Makefile.win" Executing make... mingw32-make.exe -f "C:\Projects\WinCalcK\Makefile.win" all g++.exe -c FunTab.cpp -o unTab.o -I"C:\MinGW\include" -I"C:\MinGW\include\c++" = -I"C:\MinGW\include" -DSTRICT -g3 -mwindows In file included from C:/MinGW/include/windef.h:235, from C:/MinGW/include/windows.h:48, from C:/MinGW/include/c++/3.2/mingw32/bits/gthr-default.h:462, from C:/MinGW/include/c++/3.2/mingw32/bits/gthr.h:98, from C:/MinGW/include/c++/3.2/mingw32/bits/c++io.h:37, from C:/MinGW/include/c++/3.2/bits/fpos.h:44, from C:/MinGW/include/c++/3.2/iosfwd:46, from C:/MinGW/include/c++/3.2/bits/stl_algobase.h:70, from C:/MinGW/include/c++/3.2/bits/stl_tree.h:86, from C:/MinGW/include/c++/3.2/map:66, from SymTab.h:4, from FunTab.cpp:3: C:/MinGW/include/winnt.h:2347: semicolon missing after struct = declaration C:/MinGW/include/winnt.h:2347: abstract declarator ` _IMAGE_AUX_SYMBOL::<anonymous struct>::<anonymous union>::<anonymous struct> ' used as declaration C:/MinGW/include/winnt.h:2347: namespace-scope anonymous aggregates must = be static mingw32-make.exe: *** [FunTab.o] Error 1 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.385 / Virus Database: 217 - Release Date: 04/09/2002 |
From: <dan...@ya...> - 2002-09-10 19:54:54
|
--- Napoleon Ahiable <nah...@so...> wrote: > Hi, > > First of all let me appologise if this is not the right place for this > thread. My only reason for posting is that the problem arises only when I > compile with the latest mingw hence my thinking that may be it has something > to do with MingW. > > I have just downloaded and installed the latest mingw 2.0.0-3. > > I have this problem though with a project which hither to compiled without > errors. Below are the error messages: > > Building Makefile: "C:\Projects\WinCalcK\Makefile.win" > Executing make... > mingw32-make.exe -f "C:\Projects\WinCalcK\Makefile.win" all > g++.exe -c FunTab.cpp -o > unTab.o -I"C:\MinGW\include" -I"C:\MinGW\include\c++" -I"C:\MinGW\include" > -DSTRICT -g3 -mwindows Thanks for the report Can you replace the "-c" in above with "-c -save-temps" to get a preprocessed output file FunTab.ii, compress it and post compressed file to me privately. Thanks Danny http://mobile.yahoo.com.au - Yahoo! Messenger for SMS - Now send & receive IMs on your mobile via SMS |
From: <dan...@ya...> - 2002-09-11 22:41:11
|
--- Napoleon Ahiable <nah...@so...> wrote: > Hi, > > First of all let me appologise if this is not the right place for this > thread. My only reason for posting is that the problem arises only when I > compile with the latest mingw hence my thinking that may be it has something > to do with MingW. > > I have just downloaded and installed the latest mingw 2.0.0-3. > > I have this problem though with a project which hither to compiled without > errors. Below are the error messages: > > Building Makefile: "C:\Projects\WinCalcK\Makefile.win" > Executing make... > mingw32-make.exe -f "C:\Projects\WinCalcK\Makefile.win" all > g++.exe -c FunTab.cpp -o > unTab.o -I"C:\MinGW\include" -I"C:\MinGW\include\c++" -I"C:\MinGW\include" > -DSTRICT -g3 -mwindows > > In file included from C:/MinGW/include/windef.h:235, > from C:/MinGW/include/windows.h:48, > from > C:/MinGW/include/c++/3.2/mingw32/bits/gthr-default.h:462, > from C:/MinGW/include/c++/3.2/mingw32/bits/gthr.h:98, > from C:/MinGW/include/c++/3.2/mingw32/bits/c++io.h:37, > from C:/MinGW/include/c++/3.2/bits/fpos.h:44, > from C:/MinGW/include/c++/3.2/iosfwd:46, > from C:/MinGW/include/c++/3.2/bits/stl_algobase.h:70, > from C:/MinGW/include/c++/3.2/bits/stl_tree.h:86, > from C:/MinGW/include/c++/3.2/map:66, > from SymTab.h:4, > > from FunTab.cpp:3: > C:/MinGW/include/winnt.h:2347: semicolon missing after struct declaration > > C:/MinGW/include/winnt.h:2347: abstract declarator ` > _IMAGE_AUX_SYMBOL::<anonymous struct>::<anonymous union>::<anonymous > struct> > ' used as declaration > > C:/MinGW/include/winnt.h:2347: namespace-scope anonymous aggregates must be > static > > mingw32-make.exe: *** [FunTab.o] Error 1 > Thanks for your follow-up on this. I think you have exposed a genuine bug in GCC. The FunTab classes in your code are in namespace Function This collides with the usage of Function as a name of field of _IMAGE_AUX_SYMBOL in winnt.h:2347: The quick workaround is to change namespace Function to namespace FunTab_Function in your code. I will try to distill your code to a simple testcase and submit it as bug to GCC to see if we can get a real fix Danny http://mobile.yahoo.com.au - Yahoo! Messenger for SMS - Now send & receive IMs on your mobile via SMS |
From: <dan...@ya...> - 2002-09-13 20:30:21
|
--- Danny Smith <dan...@ya...> wrote: > --- Napoleon Ahiable <nah...@so...> wrote: > Hi, > > > > First of all let me appologise if this is not the right place for this > > thread. My only reason for posting is that the problem arises only when I > > compile with the latest mingw hence my thinking that may be it has > something > > to do with MingW. > > > > I have just downloaded and installed the latest mingw 2.0.0-3. > > > > I have this problem though with a project which hither to compiled without > > errors. Below are the error messages: > > > > Building Makefile: "C:\Projects\WinCalcK\Makefile.win" > > Executing make... > > mingw32-make.exe -f "C:\Projects\WinCalcK\Makefile.win" all > > g++.exe -c FunTab.cpp -o > > unTab.o -I"C:\MinGW\include" -I"C:\MinGW\include\c++" > -I"C:\MinGW\include" > > -DSTRICT -g3 -mwindows > > > > In file included from C:/MinGW/include/windef.h:235, > > from C:/MinGW/include/windows.h:48, > > from > > C:/MinGW/include/c++/3.2/mingw32/bits/gthr-default.h:462, > > from C:/MinGW/include/c++/3.2/mingw32/bits/gthr.h:98, > > from C:/MinGW/include/c++/3.2/mingw32/bits/c++io.h:37, > > from C:/MinGW/include/c++/3.2/bits/fpos.h:44, > > from C:/MinGW/include/c++/3.2/iosfwd:46, > > from C:/MinGW/include/c++/3.2/bits/stl_algobase.h:70, > > from C:/MinGW/include/c++/3.2/bits/stl_tree.h:86, > > from C:/MinGW/include/c++/3.2/map:66, > > from SymTab.h:4, > > > > from FunTab.cpp:3: > > C:/MinGW/include/winnt.h:2347: semicolon missing after struct declaration > > > > C:/MinGW/include/winnt.h:2347: abstract declarator ` > > _IMAGE_AUX_SYMBOL::<anonymous struct>::<anonymous union>::<anonymous > > struct> > > ' used as declaration > > > > C:/MinGW/include/winnt.h:2347: namespace-scope anonymous aggregates must be > > static > > > > mingw32-make.exe: *** [FunTab.o] Error 1 > > > > Thanks for your follow-up on this. I think you have exposed a genuine bug in > GCC. > > The FunTab classes in your code are in > namespace Function > > This collides with the usage of Function as a name of field of > _IMAGE_AUX_SYMBOL in winnt.h:2347: > > > The quick workaround is to change > namespace Function > to > namespace FunTab_Function > > in your code. > > I will try to distill your code to a simple testcase and submit it as bug to > GCC to see if we can get a real fix > > Danny > This is related to the other thread on windows.h namespace pollution. The problem is a mingw-specific one. By default the thread-support code (gthread_default.h) includes windows.h which pollutes the C++ namespace with a stack of the w32api names. This can be avoided by defining __GTHREAD_HIDE_WIN32API This will hide the w32api and instead call stubs in libgcc.a. Of course if you need to use w32api in your C++ code you just have to be careful about what names you use. Maybe __GTHREAD_HIDE_WIN32API should be default. It can be changed. Danny http://mobile.yahoo.com.au - Yahoo! Messenger for SMS - Now send & receive IMs on your mobile via SMS |
From: Earnie B. <ear...@ya...> - 2002-09-13 20:57:19
|
Danny Smith wrote: > > > Maybe __GTHREAD_HIDE_WIN32API should be default. It can be changed. > Yes, please. Earnie. |
From: Oscar F. <of...@wa...> - 2002-09-13 22:15:44
|
Earnie Boyd <ear...@ya...> writes: > Danny Smith wrote: > > > > > > Maybe __GTHREAD_HIDE_WIN32API should be default. It can be changed. > > > > Yes, please. Let's see: from http://www.geocrawler.com/archives/3/6016/2002/5/0/8773685/ --- Quote [snip] I realize that this patch creates a backward compatability issue: libs built with new GCC would contain references to functions that are not available in libgcc.a in GCC 3.0 or 3.1. However, the new functions are referenced only if the user defines __GTHREAD_HIDE_WIN32API, so the default behaviour is to _not_ introduce new dependencies. [snip] --- end quote As gcc 3.2 is ABI incompatible with previous releases, the above point is moot. I found nothing on the libstdc++ nor on the gcc ml about __GTHREAD_HIDE_WIN32API. AFAIK, the tradeoffs are: * Current behavior: slightly faster execution for some SC++L functionality, mostly I/O. My bet is that the performance change will be unnoticeable. Tons of Win32 names on the global namespace, including thousands of #define's. * Alternate behavior: slightly slower execution for some SC++L functionality and no tons of Win32 names on the global namespace. * The user can chose by means of __GTHREAD_HIDE_WIN32API. By all means, put __GTHREAD_HIDE_WIN32API as default. -- Oscar |
From: Greg C. <chi...@mi...> - 2002-09-14 00:06:50
|
Oscar Fuentes wrote: > > Earnie Boyd <ear...@ya...> writes: > > > Danny Smith wrote: > > > > > > Maybe __GTHREAD_HIDE_WIN32API should be default. It can be changed. > > > > Yes, please. > > * Current behavior: slightly faster execution for some SC++L > functionality, mostly I/O. My bet is that the performance change will > be unnoticeable. Tons of Win32 names on the global namespace, > including thousands of #define's. Thus: - old code is broken, causing - legitimate complaints about standard conformance, causing - resources diverted to answering complaints and offering workarounds > * Alternate behavior: slightly slower execution for some SC++L > functionality and no tons of Win32 names on the global namespace. And slightly faster compiles for files that use STL but not windows, due to less load on CPP. > * The user can chose by means of __GTHREAD_HIDE_WIN32API. > > By all means, put __GTHREAD_HIDE_WIN32API as default. Yes, by all means. |