VS明明定义了函数却编译出错:error LNK2019: 无法解析的外部符号
2017-09-14 13:01
639 查看
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
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
相关文章推荐
- VC编译错误:error LNK2019: 无法解析的外部符号 "void __stdcall _com_issue_error(long)" (?_com_issue_error@@YGXJ@Z),该符号在函数 "void __cdecl _com_ut
- ARToolKit编译error LNK2019: 无法解析的外部符号 ___glutInitWithExit@12,该符号在函数 _glutInit_ATEXIT_HACK@8 中被引用 解决办法
- 错误 1 error LNK2019: 无法解析的外部符号 _WinMain@16 编译出错
- 关于编译eMule0.48a 提示: zlib.lib(gzio.obj) : error LNK2019: 无法解析的外部符号 __imp__strerror ,该符号在函数 _gzerror 中被引用
- dcmdata.lib(dcuid.obj) : error LNK2019: 无法解析的外部符号 _GetAdaptersInfo@8,该符号在函数 "struct _IP_ADAPTER_INFO
- 编译出现的错误- error LNK2019: 无法解析的外部符号 _GetProcessMemoryInfo@12
- MS 4000 VCRTD.lib(crtexew.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainC
- MSVCRTD.lib(crtexew.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainC(2012-04-22 16:20:02
- MSVCRTD.lib(crtexe.obj) : error LNK2019: 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStart
- 错误 error LNK2019: 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用
- MSVCRTD.lib(crtexe.obj) : error LNK2019: 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStart
- error LNK2019: 无法解析的外部符号 _SDL_main,该符号在函数 _main_utf8 中被引用
- 摘:"error LNK2019: 无法解析的外部符号 该符号在函数 中被引用" 错误原因
- error LNK2019: 无法解析的外部符号 _GET_X_LPARAM,该符号在函数 _WndProc@16 中被引用
- error LNK2019: 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用 MSVCRTD.lib
- error LNK2019: 无法解析的外部符号 ___glutInitWithExit@12,该符号在函数 _glutInit_ATEXIT_HACK@8 中被引用 1>GEARS.obj : error LNK2019: 无法解析的外部符号 ___gl
- 错误1:error LNK2019: 无法解析的外部符号 __imp__closesocket@4,该符号在函数 _wmain 中被引用
- vs2013下配置opencv2.4.9&openNI2提示错误:error LNK2019: 无法解析的外部符号
- MSVCRTD.lib(crtexe.obj) : error LNK2019: 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStart
- MSVCRTD.lib(crtexew.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCRTStartup 中被引用