Old 02-10-2015, 03:47 PM   #1
srbshawker
Human being with feelings
 
Join Date: Feb 2015
Posts: 1
Default Help with linking another dylib from my reaper dylib.

Hey all,

I'm hoping this will be the correct forum -- it's related to a Mac OS plug-in development question.

I'm creating a REAPER plug-in and so far so good. Well, that was until I needed to include a dynamic library into my project.

If I have my reaper_blah.dylib and it itself relies on a foo.dylib (can't be statically linked), REAPER will not load my plugin on startup regardless of where I try and put it:

=> Applications/REAPER64/Contents/Plugins
=> ~/Library/Application Support/REAPER/UserPlugins
=> /usr/lib
etc.

If I run "otool -L reaper_blah.dylib" then I can see the found dylib in /usr/lib. But obviously when I run REAPER64, then it must not see it :|.

Note that if I don't include this dylib and the code depending on it in my xcode project, my reaper_blah plugin loads fine and works. With the dylib (and code) included, when I attach to the process in xcode, it never even reaches my plugin entrypoint.

Has anybody had any experience with building a REAPER plugin that depends on a dynamic library on the Mac?

Where should I be putting this dylib in order for REAPER to see it?

Thanks!
Steve
srbshawker is offline   Reply With Quote
Old 02-10-2015, 11:00 PM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

I've got that to work. If my memory serves right, I did it with dlopen and dlsym calls. I gave dlopen an explicit path to the other dylib. All else failing, that approach should work for a dylib that has just C functions. If it's a dylib with C++ classes/code, maybe it won't work so well...(By the way, just to clarify one possible basic issue : the 32/64 bitness of Reaper, your dylib and the external dylib must all match of course.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.