Cannot include Accelerate Header in iOS C++ code -
i have code want call vdsp upon. c++ file, in xcode project. main project in objective c. whenever
#include <accelerate/accelerate.h>
it gives me lot of errors.
#if defined(__cplusplus) #pragma once #include <accelerate/accelerate.h> // <-- error #include "oscillator.h" namespace synth { class cqblimitedoscillator : public coscillator { float douts[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; public: cqblimitedoscillator(void); ~cqblimitedoscillator(void); // --- init globals inline virtual void initglobalparameters(globaloscillatorparams* pglobaloscparams) { // --- call base class first store pointer coscillator::initglobalparameters(pglobaloscparams); // --- add qbl specifics here } // -- parallel proqcess 4 sawteeth inline void dosawteeth(float* doutsin, float dmodulo, float dinc) { float scalar2val = 2.0f; float scalar1val = -1.0f; // -- 2.0f*dvalue - 1.0f vdsp_vsmsa(doutsin, 1, &scalar2val, &scalar1val, doutsin, 1, 4); }
one of files included in oscillator.h had this:
#include "math.h"
changing
#include <cmath>
did trick. accelerate uses math library in way (cmath) well.
Comments
Post a Comment