On Sep 22, 2006, at 11:40 AM, Theodore H. Smith wrote:
Hi people,
I''m having a little trouble getting UB plugin compiling to work. I
can compile for UB, but RB crashes when building it.
I got a plugin for UB from a kind plugin author.
Now... I ran pre-process just to see what all this define header
madness was really resulting in. it resulted in this part here:
void REALPluginMain(void *(*resolver)(const char *entryName)) {
void (*pRegisterPluginVersion)(int version);
__sinit();
gResolver = resolver; // this one isn't even used except on
the next line!!
gResolverPPC = (void *(*)(const char *)) gResolver
("ResolverPPC");
pRegisterPluginVersion = (void (*)(int)) CallResolver
("RegisterPluginVersion");
pRegisterPluginVersion(9);
PluginEntry();
}
OK... So why are we calling "ResolverPPC" if we are running on
Intel MachO?? Strange. Is this really right?
No, it's not. There's a "bug" in Xcode that causes Disassembly and
Preprocess to operate on the native architecture, not on the
architecture the target is using.
I thought ResolverPPC was a thing of the past. Will RB mind if I
pass 6 instead of 9 to pRegisterPluginVersion? No problem passing
9, just curious, as I'm passing 6 currently.
ResolverPPC is still used for PowerPC applications.
Also, __sinit... aha my plugins not doing that yet either. I guess
thats something all Mac plugins need?? Mac Carbon, Mac MachO PPC,
Mac Macho Intel, all need this __sinit thing?
It doesn't hurt.
I wasn't using REALPluginMain as my function name either (was
"main"), I'll need to fix that for UB.
Correct.
However, none of this affects how REALbasic builds applications. What
version of REALbasic are you using? REALbasic 2006r3 and prior won't
recognize Universal Mach-O plugin parts. Universal plugins need to be
placed in a "Mac Carbon Mach-O Universal" folder if you want to
maintain compatibility with r3 and prior.
-Jon
--
Jonathan Johnson
[EMAIL PROTECTED]
REAL Software, Inc.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>