我下載了所謂的Miguel_2D_unwrapper.cpp一個C++文件在: http://read.pudn.com/downloads199/sourcecode/graph/texture_mapping/938065/phase%20unwraping/Miguel_2D_unwrapper.cpp__.htmMatlab的符合C++文件錯誤:致命錯誤C1083:無法打開包含文件:「stdafx.h中」
當我嘗試使用Matlab的C++代碼(只需鍵入:MEX Miguel_2D_unwrapper_with_mask.cpp在Matlab命令),一個錯誤彈出:
fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory.
當我嘗試用//#評論的 「stdafx.h中」 包括 「stdafx.h中」,另一個錯誤啪啪up:
Error using mex LINK : error LNK2001: unresolved external symbol mexFunction
Miguel_2D_unwrapper.lib : fatal error LNK1120: 1 unresolved externals.
我使用Microsoft Windows SDK 7.1(C++)與用於C++語言編譯的「Microsoft Visual C++ 2015 Professional」結合使用。
有人可以讓我解決這個問題嗎?謝謝!
也許你應該下載整個RAR檔案,而不僅僅是單個文件。 –
此外,雖然您可能能夠使用MATLAB準備數據,然後通過該例程運行該文件,但不會將該文件設置爲MEX功能執行。 –
我已經在Matlab中的當前文件夾中擁有整個存檔。我按照該算法的作者之一的建議,在matlab中運行C++代碼。代碼應該能夠在Matlab中成功編譯 – jingweimo