Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Trouble at linking stage with Matlab 2011 and Microsoft Visual C++ 2010
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (2)
Kaustubha Govind
am 12 Mai 2012
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 Kommentare
Michael
am 22 Mai 2012
Hi Carolyn, did you find a way to fix your problem? I have the same one.
1 Kommentar
Kaustubha Govind
am 23 Mai 2012
Michael: Did my answer not help you? Do you have a function called "mexFunction" in your MEX-file?
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!