How to fix the external link error while using mex?
11 次查看(过去 30 天)
显示 更早的评论
LINK : error LNK2001: unresolved external symbol mexFunction C:\Users\...\AppData\Local\Temp\mex_eBKGmV\templib.x : fatal error LNK1120: 1 unresolved externals
C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: Link of 'hello.mexw64' failed.
0 个评论
回答(1 个)
James Tursa
2016-2-26
编辑:James Tursa
2016-2-26
You need to have the gateway function mexFunction in your source code. See this link and the examples listed there:
Once you have that set up properly, and the file is in the current directory, then all you do is enter this at the command prompt:
mex source_file_name.cpp
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!