VS明明定义了函数却编译出错:error LNK2019: 无法解析的外部符号

1>LINK : 没有找到 E:\VS2008\ASM_C_test\Debug\ASM_C_test.exe 或上一个增量链接没有生成它;正在执行完全链接
1>ASM_C_test.obj : error LNK2019: 无法解析的外部符号 "void __cdecl DSPF_sp_fftSPxSP(int,float *,float *,float *,unsigned char *,int,int,int)" (?DSPF_sp_fftSPxSP@@YAXHPAM00PAEHHH@Z),该符号在函数 _wmain 中被引用

1>E:\VS2008\ASM_C_test\Debug\ASM_C_test.exe : fatal error LNK1120: 1 个无法解析的外部命令



明明定义了函数和声明却提示说error LNK2019: 无法解析的外部符号


因为你的文件是c文件,而工程是是c++的工程,你要在声明中用extern c来修饰

或者把定义的c文件改成cpp格式


#ifdef   __cplusplus
extern   "C"   {
#endif
	
	void DSPF_sp_fftSPxSP_cn(int N, float *ptr_x, float *ptr_w, float *ptr_y,
		unsigned char *brev, int n_min, int offset, int n_max);

#ifdef   __cplusplus
}
#endif









你可能感兴趣的:(VS音频仿真)