When running older MEX-files in MATLAB 6.0, I get errors regarding unresolved external symbol mexFunction. I tried rebuilding the code with the new versions of MATLAB and the Compiler within Microsoft Visual Studio 6.0 and get the following errors:
Test.def : error LNK2001: unresolved external symbol mexFunction Release/Test.lib : fatal error LNK1120: 1 unresolved externals LINK : fatal error LNK1141: failure during build of exports file Error executing link.exe.
The .def file contains the following:
LIBRARY Test.dll EXPORTS mexFunction
The MEX, C and h files and stubs were built using:
mcc -t -L C -W mex Test.m
The following 2 pre-link steps are included in the project settings:
lib /def:"d:\matlabr11\extern\include\matlab.def" /machine:ix86/out:"Release\mymatlab.lib" lib /def:"d:\matlabr11\extern\include\libmatlbmx.def" machine:ix86/out:"Release\mylibmatlbmx.lib"
These generated lib files are then linked into the project.
All of this is still the same as for R11: I only changed my paths from
"MatlabR11" to "MatlabR12"…
Best Answer