Calling Matlab from C - Build the lib and dll files
Info
This question is closed. Reopen it to edit or answer.
Show older comments
I am trying to call MATLAB function from C code. I started with a very simple one which gets the image as input and does thresholding on the image. the function is
function ImageOut= tfunc( ImageIn ) Level = graythresh( ImageIn ); ImageOut = zeros( size( ImageIn ) ); ImageOut( ImageIn > Level ) = 1; end
now I am trying to build the lib and dll files using command:
mcc -v -W cpplib:test.lib -T link:lib tfunc
but at the end it gives me this error:
boost::filesystem::file_size: The system cannot find the file specified Error using mcc Error executing mcc, return status = 1 (0x1).
Can anyone help me what cause this error? I have matlab R2013a and platform is windows. Thanks
Answers (1)
Vladimir Pribula
on 9 Dec 2014
0 votes
I just ran into this same problem. Do not add .lib when specifying cpplib:
mcc -v -W cpplib:test -T link:lib tfunc
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!