我正在用 VC++ 编写 BCI 游戏应用程序,需要实现通用空间模式过滤 (CSP) 来提取特征。由于涉及大量编码,我更喜欢使用现有的 CSP Matlab 函数。我按照 here 中给出的步骤进行操作.但是,我收到以下链接错误消息:
1>------ Build started: Project: Test4, Configuration: Debug Win32 ------
1>test.obj : error LNK2019: unresolved external symbol _mxGetScalar referenced in function _main
1>test.obj : error LNK2019: unresolved external symbol _mxDestroyArray referenced in function _main
1>test.obj : error LNK2019: unresolved external symbol _mxCreateDoubleScalar referenced in function _main
1>test.obj : error LNK2019: unresolved external symbol _engEvalString referenced in function _main
1>test.obj : error LNK2019: unresolved external symbol _engOpen referenced in function _main
1>test.obj : error LNK2019: unresolved external symbol _engClose referenced in function _main
1>test.obj : error LNK2019: unresolved external symbol _engGetVariable referenced in function _main
1>test.obj : error LNK2019: unresolved external symbol _engPutVariable referenced in function _main
1>test.obj : error LNK2019: unresolved external symbol _engOutputBuffer referenced in function _main
1>D:\Test4\Debug\Test4.exe : fatal error LNK1120: 9 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
谁能帮我解决这个问题?如有任何意见,我们将不胜感激。提前致谢。
最佳答案
正如我在 referred post 中所说的那样,您必须保持平台一致:
The platforms of MATLAB and VC++ compile platform must be the same, i.e. Win32/x86 VC++ compile platform can only use x86 MATLAB and x64 VC++ compile platform can only use x64 MATLAB.
您正在使用 MATLAB x64,因此您也必须在 x64 中构建您的 VC 项目。
关于c++ - matlab R2013a 和 MS VC++ 2013 之间的链接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26156440/