Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Trouble at linking stage with Matlab 2011 and Microsoft Visual C++ 2010
1 回表示 (過去 30 日間)
古いコメントを表示
I am using the 2011 version of Matlab and Microsoft Visual C++ 2010. I ran mex -setup fine, no problems. I checked the paths in the mexext file to make sure they were getting set properly at the setup stage, and that all looked fine. If I do mex -c test.c, I get no errors. So it doesn't seem to be a compilation problem. But if I do mex test.c I get what seems to be an error indicating that something is going wrong at the link stage. Any help would be greatly appreciated.
Here's the error message I am getting: >> mex test.c LINK : error LNK2001: unresolved external symbol mexFunction C:\Users\cprose\AppData\Local\Temp\mex_71ByMo\templib.x : fatal error LNK1120: 1 unresolved externals
C:\PROGRA~1\MATLAB\R2011A\BIN\MEX.PL: Error: Link of 'test.mexw64' failed.
??? Error using ==> mex at 208 Unable to complete successfully.
0 件のコメント
回答 (2 件)
Kaustubha Govind
2012 年 5 月 12 日
All MEX-functions need to have an entrypoint function call mexFunction - it looks like you have not defined it in test.c. Look at the MEX documentation for examples.
0 件のコメント
Michael
2012 年 5 月 22 日
Hi Carolyn, did you find a way to fix your problem? I have the same one.
1 件のコメント
Kaustubha Govind
2012 年 5 月 23 日
Michael: Did my answer not help you? Do you have a function called "mexFunction" in your MEX-file?
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!