missing header ?
davephillips opened this issue · 5 comments
Greetings ! Very cool project, looks like fun, but I'm hitting a wall with this error:
/home/dlphilp/src/mi-UGens/MiBraids/MiBraids.cpp:45:10: fatal error: Accelerate/Accelerate.h: No such file or directory
#include "Accelerate/Accelerate.h"
^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
and this error:
/home/dlphilp/src/mi-UGens/MiPlaits/MiPlaits.cpp: In function ‘void MiPlaits_Ctor(MiPlaits*)’:
/home/dlphilp/src/mi-UGens/MiPlaits/MiPlaits.cpp:84:9: error: ‘printf’ was not declared in this scope
printf("mem alloc failed!");
^~~~~~
Any suggestions ? I'm building on Linux, Ubuntu 18.04, with GCC 7.5.0.
Best regards,
Dave Phillips
Hi Dave, thanks for pointing these out.
I haven’t thought much about cross-platform support, yet, and still need to update the projects in this respect.
- Accelerate is an apple only framework for speeding up vector calculations. you can simply comment it out, as I haven’t used it in the code, yet.
- Replace 'printf' with SC's ‘Print’ and this should be fixed, too.
Will update the code later.
Thank you for the quick assistance, I've successfully compiled all the ugens. A few notes:
The printf can remain in place if I add this header to MiPlaits.cpp:
#include <stdio.h>
The build script should probably include the pull for the libsamplerate dependency. I ran this to retrieve it:
git submodule update --init --update
Finally, libsamplerate's configure script needs to specify the -fPIC option. On my system MiBraids wouldn't build with the default libsamplerate.a until I specified PIC support for the dependency.
./configure --with-pic
Thanks for this project, it's a very cool addition to SuperCollider. I haven't done anything with SC for quite a while, but I have been learning how to use the MI modules through their implementation in VCV Rack. However, I do keep up with SuperCollider development, your code builds here with the latest git pull.
Great to hear it's working for you. So, you say you are running this on a PIC?
Great to hear it's working for you. So, you say you are running this on a PIC?
No, it's a C flag:
The -fPIC flag means Position Independent Code, the code is made to be independent of load location - loaded anywhere.
I see, thanks.