Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: building and using a .jnilib that uses .dylib's



At 9:29 AM -0700 9/2/03, John Lussmyer wrote:
Okay, I've built a .jnilib that uses a set of .dylib's. It all works except
for one little problem.
All the .dylib's have to be in the same folder as the Application.App
bundle. If I put them in the folder with the .jnilib, the app doesn't work.
It seems to be unable to find the .dylib's.

So, is there some setting I can do to make the .jnilib find the .dylib's in
the same folder?

I've never tried this, but you should be able to set the install name of the dylibs to something relative to @executable_path that'll point to the directory containing the dylibs. Unfortunately, I can't find much documentation for @executable_path. Here's a page to get you started; search for "@executable_path" to find the interesting bits: <http://developer.apple.com/documentation/DeveloperTools/ProjectBuilder/ProjectBuilder.help/Contents/Resources/English.lproj/Frameworks/chapter_19_section_3.html>

What I think you'd want to do is to add a linker flag for each of your dylibs of "-Wl,-install_name,@executable_path/../Resources/Java" (if the dylibs are in your application package's Resources/Java directory). Again, this is just a guess, but it *should* work....

Hope this helps,
Eric
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.

References: 
 >building and using a .jnilib that uses .dylib's (From: John Lussmyer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.