Re: C++ And Loaded Code And Static Lib

SD <macosxdevlist-LS+HbC+WUqxt2bImrQXijVaTQe2KTcn/@public.gmane.org>
Newsgroups gmane.comp.macosx.devel
Message-ID <p062408a8c7ee84902303@[172.16.32.166]>
Wow, twisted stuff.

One of my API extern C functions was using some functions that had 
the inline keyword on them.  When using inline, the wrong someFunx() 
gets called.  Remove the inline and it seems to work fine.

What a waste of a day.


-----------------------------------------------------------
inline void someFunx()
{
   someOtherFunx();
}

extern apiFunx()
{
   //calls the wrong someFunx() if inline used on someFunx()
   someFunx();
}
-----------------------------------------------------------

Thanx for the responses, hope this helps someone in the future (come 
get me Google).

SD.

______________________________________________________________________
Previous message from SD on 4/16/10 at 12:25 PM -0700
**********************************************************************
>I have a static library that I've built.  This library consists of 
>mostly C++ classes in a separate namespace (call it MyNameSpace).
>
>I also have two pref panes (think of them as Code bundles that get 
>loaded into an app).  Both of these pref panes statically link with 
>my library.
>
>However, when the second pref pane/code bundle is loaded, it uses 
>the classes loaded from the first pref pane/code bundle (even if the 
>classes have different implementations but the same names).
>
>How do I get each pref pane/code bundle to use the classes it linked 
>with, rather than looking them up from previously loadded code?
>
>I knew this was a problem with Objective-C, but I had though C++ 
>didn't have this problem.
>
>Thank you muchly, this a huge problem for me.
>
>SD.
>--
>==========================================
>SD
>
>WARNING: Programming may be habit forming.
>_______________________________________________
>MacOSX-dev mailing list
>[email protected]
>http://www.omnigroup.com/mailman/listinfo/macosx-dev


-- 
==========================================
SD

WARNING: Programming may be habit forming.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.