Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Trouble at linking stage with Matlab 2011 and Microsoft Visual C++ 2010

1 visualizzazione (ultimi 30 giorni)
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.

Risposte (2)

Kaustubha Govind
Kaustubha Govind il 12 Mag 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.

Michael
Michael il 22 Mag 2012
Hi Carolyn, did you find a way to fix your problem? I have the same one.
  1 Commento
Kaustubha Govind
Kaustubha Govind il 23 Mag 2012
Michael: Did my answer not help you? Do you have a function called "mexFunction" in your MEX-file?

Questa domanda è chiusa.

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by