Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Trouble at linking stage with Matlab 2011 and Microsoft Visual C++ 2010
조회 수: 2 (최근 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!