On Mar 16, 2006, at 12:00 PM, Garth Hjelte wrote:

At 11:34 AM 3/16/2006 -0500, you wrote:

> I've made a .dylib for my app to call. My app is now Mach-O, so it's a > bundle by definition. I want the .dylib inside the bundle, and to call
> it from there so I don't have to distribute it seperately. How do I
> write the Declare? All the examples talk about calling a system thing,
> not a custom-made thing.

I explain how to do this in my book on declares at
<http://www.declareSub.com/>.  See the section on soft declares in
chapter 2.  Basically, you declare a function as follows.

Soft Declare Sub Foo Lib "@executable_path/../Frameworks/Foo.bundle" ()

Thanks - related question. What about Debug mode? Is this always necessary then?

#if DebugBuild
        Soft Declare Sub Foo Lib "FooLib.dylib" ()
#else
Soft Declare Sub Foo Lib "@executable_path/../Frameworks/FooLib.dylib" ()
#endif

With soft declares, perhaps not. You might try the following. Put FooLib in the same folder as the project. Then in the App.Open event handler, copy FooLib into the debug app bundle. And let me know if it works.

--------------
Charles Yeomans

_______________________________________________
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>

Reply via email to