patricksebastien / libpd4unity

libpd for unity 3d
101 stars 20 forks source link

libpd4unity mac has no libpd_safe_init function #8

Open Daandelange opened 10 years ago

Daandelange commented 10 years ago

Hello, I tried the plugin on Mac + Unity 4.5 (free) but I came across the following error when starting the _01_LibPdBasic.unity example: EntryPointNotFoundException: libpd_safe_init So basically it says that the libpd_safe_init function does not exist in libpdcsharp.dylib

I found a dirty fix for this: in LibPdNativeMethods.cs (line 88) I replaced libpd_safe_init by libpd_init which seems to exist in the dylib wrapper. Not sure if this can cause later issues, but right now it works fine! Is it normal that this function doesn't exist? I couldn't find this function in the libpdcs sources...

Btw, (just for the record) to get this plugin to work in Unity free on Mac OS X, you have to rename libpdcsharp.dylib to libpdcsharp.bundle and put it in your project root folder (not in the /Assets folder) Also remove or rename /Assets/Plugins/libpdcsharp.bundle to get rid of the License error message.

patricksebastien commented 9 years ago

I confirm that I have the same error on Windows. Will try your fix and if it's working, I will update LibPdNativeMethod.cs.

batchku commented 7 years ago

i'm having both of these issues with Unity 5.3.1f1 on os x 10.11.

are either of these two issues (unsafe errors and wrong architecture complaints) resolved in the present version of the repository?