Advertisement

gcc 2.96, inlining and multiple def. linker errors

Started by September 15, 2003 01:05 PM
10 comments, last by xtrmntr 21 years, 1 month ago
I believe you need an extern declaration to make your code valid C. The other compilers mentioned may just be using the C++ rules.

Anyway, that might be a moot point because it looks like not even gcc 3.3.1 fully supports the C99 inline rules. I thought that was fixed by now. You can try using static inline instead, that's valid C99 and should work in GCC. For portable code you probably want to use a macro.

[edited by - spock on September 18, 2003 5:36:14 AM]
yeah spock.

I haven''t tried extern but i saw it mentioned as a possible solution. static inline DOES work and probably the solution I''ll have to use luckily i have been using macros for the inline definition for easier protability so it shouldn''t really be that much hassle.

Thanks for your help!

This topic is closed to new replies.

Advertisement