third party framework deployment
I have some troubles in deploying a Jitter external using the dc1394 framework
I’ve got the error :
av.jit.iidc: unable to load object bundle executable
2010-04-09 15:54:56.735 av.jit.iidc-app[379:20b] Error loading /private/var/folders/zz/zzzivhrRnAmviuee++4K-U+-ZUM/TemporaryItems/appRuntime-mxt/av.jit.iidc.mxo/Contents/MacOS/av.jit.iidc: dlopen(/private/var/folders/zz/zzzivhrRnAmviuee++4K-U+-ZUM/Tempor
aryItems/appRuntime-mxt/av.jit.iidc.mxo/Contents/MacOS/av.jit.iidc, 262): Library not loaded: @executable_path/../Frameworks/dc1394.framework/Versions/A/dc1394
Referenced from: /private/var/folders/zz/zzzivhrRnAmviuee++4K-U+-ZUM/TemporaryItems/appRuntime-mxt/av.jit.iidc.mxo/Contents/MacOS/av.jit.iidc
Reason: image not found
It looks like a Xcode configuration problem but I can’t find out a solution with google so I post it here…
I think I have to include the framework in the MachO bundle and to link it with the external but I don’t know how…
Could someone help me ?
There are a variety of approaches:
1. If you have the source, the easiest solution may to simply include it all in your project and avoid any linking issues.
2. If you configure your project correctly, you can automatically link to it in one of the standard frameworks folders or inside the application bundle. Personally I’m not aware of whether or not it is possible to set it up to automatically find inside your own object bundle:
3. You can load from somewhere in the search path (or explicitly from a known location like in your object’s bundle) with a dynamic loading and linking strategy like the following, which we do for the Cg framework:
g_jit_gl_shader_cg_framework_ok = FALSE;
if (!path_topathname(path, name, outname))
path_nameconform(outname, natname, PATH_STYLE_NATIVE, PATH_TYPE_PATH);
str = CFStringCreateWithCString(kCFAllocatorDefault, natname, kCFStringEncodingUTF8);
if (url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, str, kCFURLPOSIXPathStyle, true))
// we need to get rid of this in a quitmethodthingy
if (g_cg_bundle_ref = CFBundleCreate(kCFAllocatorDefault, url))
// jit_object_post((t_object *)x,"jit.gl.shader: loaded CG framework.");
// include the bundle binding operations
The above file explicitly loads each function to a typed function pointer like the following:
pf_cgCreateContext = CFBundleGetFunctionPointerForName(g_cg_bundle_ref, CFSTR("cgCreateContext"));
error("jit.gl.shader: unable to load CG framework function 'cgCreateContext'");
// toggle global flag
g_jit_gl_shader_cg_framework_ok = TRUE;
error("jit.gl.shader: error loading CG framework : no URL from FSRef.");
error("jit.gl.shader: unable to find CG framework.");
So to summarize, you’ll want to either: include the source, use an installer to put in standard frameworks location, or manually load and link to every function you want to use.
thanks for your reply
actually, I’m including the sources into my Xcode project
it compiles and i can run the external on my laptop (the one with which I compiled the external)
but when I try to load the external on another machine I always got some errors.
I look into the bundle architecture and i saw that the framework wasn’t in there.
So i’m trying to configure Xcode in the right way…