At 01:56 PM 3/13/2006 -0600, you wrote:
> 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.
If it's part of the example plugins, it is a PEF plugin, and
therefore you can't just call into Mach-O. You have to go through
something that will load it dynamically, so that it will insert the
glue code for you.
Thanks for your help, let me ask a separate but related question here, then
I'll get back to it.
This Shared Bundle app I have - perhaps I can call it from RB? It's a
"Bundle Package" according to CW. I made it for a company that gave me the
specs on how to build it, but I don't know how they call it.
Say I export a function called MyTestCall:
#pragma export on
extern "C" {
long MyTestCall(long myparam)
{
return myparam + myparam;
}
}
#pragma export off
How do I call that from RB? I tried this:
Declare Function MyTestCall Lib "/Library/Application
Support/ExtCompany/thislib.bundle" (myparam As Integer) As Integer
But I get an error in start the app in RB; "The application (null) could
not be launched because of a shared library error:
"R<main><main></Library/Application Support/ExtCompany/thislib.bundle><>"
Perhaps it's because "thislib.bundle" is a Mach-O bundle and I can't get
into it for the same reasons?
> 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?
Frameworks are a special type of bundle. CFBundle allows you to
dynamically load code at runtime. One benefit is that it allows Mach-
O to call PEF and PEF to call Mach-O. There is no way to "hard" link
a Mach-O framework from a PEF library.
What is a good resource for CFBundle specs and how to use it? I checked on
the Apple site and it almost seems logical, but it's sketchy to me how to
use it.
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>