This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: More .so hell


On 09 February 2006 22:31, securehell@hushmail.com wrote:

> I have a header file that includes the code for a funcion and is
> declared __forceinline on a different (Windows) platform. I am
> trying to get it to build on Linux and have tried __forceinline,
> __inline__, inline, and __attribute__((always_inline)) but gcc
> 3.4.4 doesn't seem to compile it as the header is called several
> times by various .c files.

> Using "inline" I got this while linking:
> gcc -shared -Wl,--whole-archive -fPIC -o liblib.so file.o liba.a
> libb.a -Wl,--no-whole-archive
> 
> liba.a(file1.o)(.text+0x0): In function `your_function'
>> multiple definition of `your_function'
> liba.a(file2.o)(.text+0x0): first defined here

> Any idea how to make the compiler inline this function?


  Have you read the bits in the manual about 'static inline' and 'extern
inline' etc. ?

http://gcc.gnu.org/onlinedocs/gcc-3.4.5/gcc/Inline.html#Inline


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]