A couple days ago a number of inline functions were put into winebase.h. Since then I have been unable to build, using gcc 2.96-81 (RedHat). Apparently this version of gcc thinks that because there is an extern prefixing the inline, even though the function does in fact have a body, that the function really is external. Removing the extern, just having inline as one would do in C++, does not appear to work correctly either, and causes the function to appear as a exported symbol in all the object files that header gets included with, thus resulting in multiple definitions.
I'm not sure what the correct solution would be, other than using the older function call method for this version of gcc. Perhaps I'm just missing some variant on the use of inline?
Mike Bond mbond@cox.rr.com wrote in article 20010816102721.A10210@cox.rr.com...
A couple days ago a number of inline functions were put into winebase.h. Since then I have been unable to build, using gcc 2.96-81 (RedHat).
Apparently
this version of gcc thinks that because there is an extern prefixing the inline, even though the function does in fact have a body, that the function really is external. Removing the extern, just having inline as one would do in C++, does not appear to work correctly either, and causes the function to appear as a exported symbol in all the object files that header gets included with, thus resulting in multiple definitions.
I'm not sure what the correct solution would be, other than using the older function call method for this version of gcc. Perhaps I'm just missing some variant on the use of inline?
-- TTFN MikeB
Ah. That might explain some of my problems (the "inline" of perfect_graphics in graphics/x11drv/bitblt.c which is explicitly static and possibly one with DPtoLP in windows/defwnd.c I am looking into just now).
Be aware that the problems are still there in 2.96-85 so there's not much point in updating from the RedHat site. I guess I am about to follow advice and back down to 2.95. (Does anyone know; is it simply a matter of using rpm to remove the new and install the old or am I about to start tearing my hair out?)
Bill
On Thu, Aug 16, 2001 at 01:43:43PM +0000, Bill Medland wrote:
Ah. That might explain some of my problems (the "inline" of perfect_graphics in graphics/x11drv/bitblt.c which is explicitly static and possibly one with DPtoLP in windows/defwnd.c I am looking into just now).
Be aware that the problems are still there in 2.96-85 so there's not much point in updating from the RedHat site. I guess I am about to follow advice and back down to 2.95. (Does anyone know; is it simply a matter of using rpm to remove the new and install the old or am I about to start tearing my hair out?)
Darn, and here I just got through with upgrading and was rebuilding :(.
On Thu, 16 Aug 2001, Bill Medland wrote:
Ah. That might explain some of my problems (the "inline" of perfect_graphics in graphics/x11drv/bitblt.c which is explicitly static and possibly one with DPtoLP in windows/defwnd.c I am looking into just now).
Be aware that the problems are still there in 2.96-85 so there's not much point in updating from the RedHat site. I guess I am about to follow advice and back down to 2.95. (Does anyone know; is it simply a matter of using rpm to remove the new and install the old or am I about to start tearing my hair out?)
Bill
I built gcc-2.95.3 from source and patches, so I don't have the rpm installed, but nothing else I have installed from Mandrake 7.2 has wanted gcc, so I think you may not have too hard a time with it. Sorry, I can't work out how to do the requires/provides queries on an uninstalled package.
I am a little casual with --nodeps and --force, too. I started with Slackware, so I like those options best of all rpm capabilities.
Lawson ---oof---
________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/tagj.
In article 20010816102721.A10210@cox.rr.com you wrote:
A couple days ago a number of inline functions were put into winebase.h. Since then I have been unable to build, using gcc 2.96-81 (RedHat). Apparently this version of gcc thinks that because there is an extern prefixing the inline, even though the function does in fact have a body, that the function really is external. Removing the extern, just having inline as one would do in C++, does not appear to work correctly either, and causes the function to appear as a exported symbol in all the object files that header gets included with, thus resulting in multiple definitions.
I'm not sure what the correct solution would be, other than using the older function call method for this version of gcc. Perhaps I'm just missing some variant on the use of inline?
Try 'static inline' - it's even defined in C99.
Christoph
Mike Bond wrote:
A couple days ago a number of inline functions were put into winebase.h. Since then I have been unable to build, using gcc 2.96-81 (RedHat). Apparently this version of gcc thinks that because there is an extern prefixing the inline, even though the function does in fact have a body, that the function really is external. Removing the extern, just having inline as one would do in C++, does not appear to work correctly either, and causes the function to appear as a exported symbol in all the object files that header gets included with, thus resulting in multiple definitions.
I'm not sure what the correct solution would be, other than using the older function call method for this version of gcc. Perhaps I'm just missing some variant on the use of inline?
There was a thread on 'static inline' vs. 'extern inline' on linux-kernel recently: http://marc.theaimsgroup.com/?l=linux-kernel&m=99679337730171&w=2 http://marc.theaimsgroup.com/?l=linux-kernel&m=99617009115578&w=2 http://marc.theaimsgroup.com/?l=linux-kernel&m=98594516710242&w=2 http://marc.theaimsgroup.com/?l=linux-kernel&m=98590101912992&w=2
You might try replacing 'extern' with 'static' and see what happens. Also replacing 'inline' with '__inline__' might be needed for old gcc's, maybe? - Dan