[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to suppress the "multiple definitions of symbol"

From: csmgroup
Subject: Re: How to suppress the "multiple definitions of symbol"
Date: 5 Dec 2006 22:50:06 -0800
User-agent: G2/1.0

It's hard to make the example to regenerate the error.
For the small test, it works well both Linux g++ and Mac OS X g++.

But the real OpenAccess source code which is around 40M of source code
in total.
The Mac OS X g++ code doens't seem like to make the function inlined
whereas Linux g++ always does.

I hope to find a compiler flag which forces the Mac OS X g++ always
generates the  inline.


Ulrich Eckhardt wrote:
> wrote:
> > The real problem is that even after I  declared the class functions as
> > inline, and even after forcing it to alwasy be a inline function, it
> > doesn't look like it becomes a inline function under the Mac OS X.
> >
> > template<class T>
> > inline void __attribute__((always_inline))
> > SPtr<T>::createInstance(const char  *classID,
> >                       IBase       *reserved)
> > {
> Hmmm, using __attribute((always_inline)) is like shooting with cannons on
> birds, the simple inline should do the job. I just tried something like
> what you did and couldn't reproduce the error. I guess we are not doing
> the same things, so I suggest you boil this down to a testcase. In your
> first posting you had one already, but after fixing the missing inlines,
> it should compile and link, so I wonder what the difference to the real
> program is.
> Uli
> [another fullquote environmentally friendly discarded]
> -- 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]