CICM / HoaLibrary

:warning: [deprecated] High Order Ambisonics library with Max, Pure Data, FAUST, Csound and VST implementations.
http://www.mshparisnord.fr/hoalibrary/en/
64 stars 16 forks source link

Trying to use in libpd, I get Symbol not found: _binbuf_attr_process from dlopen #4

Closed rvega closed 10 years ago

rvega commented 10 years ago

Hi.

I'm trying to use the HOA library on a C++ app that uses libpd. I'm compiling under MacOS 10.8 and when libpd tries to instantiate the [hoa.map~] object, I get the following error message from libpd:

  /long/path/hoa.map~.pd_darwin: dlopen(/long/path/hoa.map~.pd_darwin, 10): Symbol not found: _binbuf_attr_process
  Referenced from: /long/path/hoa.map~.pd_darwin
  Expected in: flat namespace
 in /long/path/hoa.map~.pd_darwin
PD:  hoa.map~ 3 1
PD: error: ... couldn't create
PD: hoa.library (version beta 1.0) by Julien Colafrancesco, Pierre Guillot & Eliott Paris
PD: Copyright (C) 2012 - 2013, CICM | Universite Paris 8

I listed hoa.map~ dependencies with:

otool -L hoa.map\~.pd_darwin  

and theoutput is:

hoa/hoa.map~.pd_darwin:
        /Users/Pierre/SourceTree/HoaLibrary/PureData/builds/hoa.map~.pd_darwin (compatibility version 1.0.0, current version 1.0.0)
        /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

Any ideas on how to load the library successfully? I can't find where the symbol binbuf_attr_process is defined. Also, notice the /User/Pierre/... path in the output of ltool. There is no such directory in my system.

Thanks :)

rvega commented 10 years ago

Ok, I figured it out. Turns out that the files from the CicmWrapper (eattr, ebox, etc.) did not have the "target membership" -> "hoa.map~" checkbox set in the hoa.map~ Xcode project so dlopen was not able to find the functions and variables defined on those files on the generated .pd_darwin library. I added all those files to the hoa.map~ target, recompiled the external as described in my comment in https://github.com/CICM/HoaLibrary/issues/5 and libpd is now able to load and use the hoa.map~ external. :)