Xcode4 架构x86_64的未应答未定义符号
我得到了错误,全部是:“架构x86_64的未定义符号” 发生此错误的最简单类是名为Peaking的类,该类计算均衡 这是我的类定义峰值Xcode4 架构x86_64的未应答未定义符号,xcode4,undefined,x86-64,symbols,Xcode4,Undefined,X86 64,Symbols,我得到了错误,全部是:“架构x86_64的未定义符号” 发生此错误的最简单类是名为Peaking的类,该类计算均衡 这是我的类定义峰值 #ifndef _PEAKING_ #define _PEAKING_ #include "IPlugBase.h" #include "IGraphics.h" class Peaking { public: Peaking() { a = new double[3]; b = new double[3]; p
#ifndef _PEAKING_
#define _PEAKING_
#include "IPlugBase.h"
#include "IGraphics.h"
class Peaking
{
public:
Peaking()
{
a = new double[3];
b = new double[3];
previousx1=0;
previouspreviousx1=0;
}
~Peaking() {}
double* a;
double* b;
void ComputeParams(double G, double fc, double Q, double fs);
double ComputeAudio(double x);
double previouspreviousx1;
double previousx1;
private:
};
#endif
这里是实现
#include <math.h>
#include "defines.hpp"
#include "Peaking.h"
void Peaking::ComputeParams(double G, double fc, double Q, double fs)
{
double K = tan((M_PI * fc)/fs);
double V0 = pow(10,(G/20.));
//Invert gain if a cut
if (V0 < 1)
V0 = 1/V0;
double a1, a2, b0, b1, b2;
////////////////////////////
// BOOST
////////////////////////////
double K2 = pow(K,2.);
double divQ = 1/Q;
double z1 = (divQ*K);
double divz2 = 1/(1 + z1 + K2);
double z3 = ((V0*divQ)*K);
double divz4 = 1/(1 + z3 + K2);
if( G > 0 )
{
b0 = (1 + z3 + K2) * divz2;
b1 = (2 * (K2 - 1)) * divz2;
b2 = (1 - z3 + K2) * divz2;
a1 = b1;
a2 = (1 - z1 + K2) * divz2;
}
////////////////////////////
// CUT
////////////////////////////
else
{
b0 = (1 + z1 + K2) * divz4;
b1 = (2 * (K2 - 1)) * divz4;
b2 = (1 - z1 + K2) * divz4;
a1 = b1;
a2 = (1 - z3 + K2) * divz4;
}
a[0] = 1;
a[1] = a1;
a[2] = a2;
b[0] = b0;
b[1] = b1;
b[2] = b2;
}
double Peaking::ComputeAudio(double x)
{
// E:\Programmation\#Audio\#EQ\dfilt_df2.gif
double srg = a[2];
double x1 = x - a[1] * previousx1 - a[2] * previouspreviousx1;
double y = x1 * b[0] + previousx1 * b[1] + previouspreviousx1 * b[2];
previouspreviousx1 = previousx1;
previousx1 = x1;
return y;
}
如果我将函数“double Peaking::ComputeAudio(double x)”的核心放在类中,一个错误就会消失
如果我将Vumeter的虚拟函数“draw”的主体放入,另一个错误就会消失所以我不能在.cpp文件中放入一些主体函数,为什么?
谢谢你的帮助
Jeff好的,我发现:“构建阶段/编译源代码”面板中没有一些.cpp文件 现在它开始工作了 我对在OSX上开发相对较新,因此这个noob错误
Jeff我想说清楚,你确定你的cpp文件正在编译吗?我没有说我必须把所有的函数都放在.h文件中,只是有些函数而已,所以我使用WDL-OL在各种架构(应用程序、AU、VST、AAX等)中创建音频插件,到目前为止,应用程序工作正常,但我在尝试编译AU插件时遇到了问题
Undefined symbols for architecture x86_64:
"OnOff::OnOff(IPlugBase*, int, int, int, IBitmap*, IBitmap*, IChannelBlend::EBlendMethod)", referenced from:
AutoEQ::AutoEQ(IPlugInstanceInfo) in AutoEQ.o
"Peaking::ComputeAudio(double)", referenced from:
AutoEQ::traiterLearning(int) in AutoEQ.o
AutoEQ::ProcessDoubleReplacing(double**, double**, int) in AutoEQ.o
"Peaking::ComputeParams(double, double, double, double)", referenced from:
AutoEQ::traiterLearning(int) in AutoEQ.o
"FFTOoura::rdft(int, int, double*, int*, double*)", referenced from:
AutoEQ::traiterLearning(int) in AutoEQ.o
"vtable for ProgressBar", referenced from:
ProgressBar::ProgressBar(IPlugBase*, int, int, int, IBitmap, IBitmap, IChannelBlend::EBlendMethod) in AutoEQ.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for EQClass", referenced from:
EQClass::EQClass(IPlugBase*, int) in AutoEQ.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for VUmetre", referenced from:
VUmetre::VUmetre(IPlugBase*, int, int, int, IBitmap, IBitmap, IChannelBlend::EBlendMethod) in AutoEQ.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for MyButton", referenced from:
MyButton::MyButton(IPlugBase*, int, int, int, IBitmap*, IChannelBlend::EBlendMethod) in AutoEQ.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)