Re: C++ name collisions between plugins
Re: C++ name collisions between plugins
- Subject: Re: C++ name collisions between plugins
- From: Paul Miller <email@hidden>
- Date: Tue, 12 Nov 2013 13:09:47 -0600
- Organization: FXTECH
On 11/12/2013 11:47 AM, Darrin Cardani wrote:
Paul,
Did you ever get this resolved? If not, I’ve got some questions below.
It wasn't actually a C++ collision, but the wrong C++ code ended up
being called (even though it was all statically linked and stripped)
because the wrong FxPlug class was getting called.
I had this kind of structure:
PLUGIN SET 1
<bunch of C++ code>
FxPlugInterface (objective C class)
filters are subclasses of FxPlugInterface
PLUGIN SET 2
<bunch of C++ code - possibly slightly different from set 1>
FxPlugInterface (objective C class - slightly different from 1)
filters subclasses of FxPlugInterface
I had it set up to only "export" (via the symbols.txt file) only the
list of per-filter Objective C classes, which are all unique. But
despite all that, when filters from either set were instantiated, it was
randomly choosing the FxPlugInterface class from either one, which
resulted in crash dumps down in the "wrong" C++ code.
To fix it I had to actually make a "FxPlugInterface2" for PLUGIN SET 2.
I had forgotten that even though symbols may be "hidden" or stripped,
once the code is loaded all bets are off if they are Objective C classes
(what a lovely feature).
The upshot is I'll have to rev my "FxPlugInterface" class with a version
number every time I change it, either in an updated or new set of filters.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden