realbasic-plugins
[Top] [All Lists]

Re: Frameworks = MachO

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Frameworks = MachO
From: Garth Hjelte <garth at chickensys dot com>
Date: Thu, 16 Mar 2006 17:50:45 -0600
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <4 dot 3 dot 2 dot 7 dot 2 dot 20060316105715 dot 0570b780 at mail dot chickensys dot com> <4 dot 3 dot 2 dot 7 dot 2 dot 20060316095349 dot 054c7eb8 at mail dot chickensys dot com> <4 dot 3 dot 2 dot 7 dot 2 dot 20060313140350 dot 0386dc20 at mail dot chickensys dot com> <4 dot 3 dot 2 dot 7 dot 2 dot 20060313132649 dot 036a1a98 at mail dot chickensys dot com> <4 dot 3 dot 2 dot 7 dot 2 dot 20060313125457 dot 03b29678 at mail dot chickensys dot com> <4 dot 3 dot 2 dot 7 dot 2 dot 20060313125457 dot 03b29678 at mail dot chickensys dot com> <4 dot 3 dot 2 dot 7 dot 2 dot 20060313132649 dot 036a1a98 at mail dot chickensys dot com> <4 dot 3 dot 2 dot 7 dot 2 dot 20060313140350 dot 0386dc20 at mail dot chickensys dot com> <4 dot 3 dot 2 dot 7 dot 2 dot 20060316095349 dot 054c7eb8 at mail dot chickensys dot com> <4 dot 3 dot 2 dot 7 dot 2 dot 20060316105715 dot 0570b780 at mail dot chickensys dot com>
At 04:19 PM 3/16/2006 -0500, you wrote:

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

Sounds pretty hacky.

The real question to me would be: how does REALBasic regard "FooLib.dylib" as where it is? The docs are sketchy, it just says "if it is on your system." What does that mean? On Windows you have a set way of doing this: same folder, system folder, environment path.

My solution actually is

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

And make sure I have all my dylib(s) in the same folder as my .rbp file.

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>


<Prev in Thread] Current Thread [Next in Thread>