Borrar filtros
Borrar filtros

How to fix the external link error while using mex?

6 visualizaciones (últimos 30 días)
sowjanya boddeti
sowjanya boddeti el 26 de Feb. de 2016
Editada: James Tursa el 26 de Feb. de 2016
LINK : error LNK2001: unresolved external symbol mexFunction C:\Users\...\AppData\Local\Temp\mex_eBKGmV\templib.x : fatal error LNK1120: 1 unresolved externals
C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: Link of 'hello.mexw64' failed.

Respuestas (1)

James Tursa
James Tursa el 26 de Feb. de 2016
Editada: James Tursa el 26 de Feb. de 2016
You need to have the gateway function mexFunction in your source code. See this link and the examples listed there:
Once you have that set up properly, and the file is in the current directory, then all you do is enter this at the command prompt:
mex source_file_name.cpp

Categorías

Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by