At 01:17 PM 3/13/2006 -0600, you wrote:
> I am trying to use a the IOFramework in my plugin.
>
> Are Frameworks only for MachO things?
Yes and no. They contain only Mach-O code, but they can be used in
PEF code via CFBundle.
> And forgive the following oft-repeated questions but I lost track
> of...
>
> If I have to use MachO, I have to make a MachO plugin and make a
> MachO application?
That's the simplest approach. However, you can dynamically load code
from the framework with the CFBundle routines. It's a lot of work,
and if you have no good reason to stay PEF, I would recommend not
doing it.
The weird thing I'm seeing is:
I have a Shared Bundle project in Codewarrior that I use for something
totally different (non-RB), it's Mach-O type of target. Accesses the
IOKit.framework, no problem.
I'm moving over part of that code to one of the example plugin RB projects
(I'm pretty new to plugins). I'm using the pluginCarbon target. The .cpp I
use for all this includes the IOKit framework, and I put that path in the
System Paths of the CW target (relative paths, it's
/System/Library/Frameworks/IOKit.framework). However, I get an error that
says it can't open IOKit.h.
Now I assume (based on your answer) that it's because the framework is in a
bundle (I do see that all these things are in a Unix executable file) and I
need to access the bundle via the CFBUndle commands. Now this seems like
too much work, or is it?
I do see that a lot of those files in the framework exist on their own in
separate files inside the IOKit.framework folder. However, when I try
linking to those, I start getting all types of conflicts within those. And
it really doesn't seem like those files really are self-sustaining.
To avoid this, should I make a Mach-O RB plugin? And to do that, I must
drop CW (which I will do soon enough, just not now) and use XCode?
> If I want to avoid making a plugin, can I make some other type of
> shared library that houses this functionality and call it from RB?
Yes, although if you're simply going to wrap a Framework, you can
just declare into the framework and save having an extra library.
Since I already have good working code in C++for this, I'd like to avoid that.
> I did make a MachO build of my app, but it now takes about a minute
> to open up, whereas the PEF app only takes 1-2 seconds. Any idea why?
No idea. I haven't ever seen that before.
OK, let me log things and perhaps something is hanging it. You don't
suppose it's that bridge, do you?
Garth Hjelte
Sampler User
_______________________________________________
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>