matlab to c++: Cannot open include file: 'mclmcrrt.h': No such file or directory - matlab-deployment

We tried to complie the m file to c++ file by matlab complier. We had the file bulit but we got the error msg as follow.
fatal error C1083: Cannot open include file: 'mclmcrrt.h': No such file or directory
Do you have any ideas about the error msg? Any suggestion will be appreciated. Thanks a lot.
Ying

This error message is caused because you need MCR dlls.
You should locate the h file in "C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v715\extern\include\"
and add it to your include path in C.
Check out the manual of Matlab compiler.

Related

Can not build a mex file in octave using mkoctfile --mex

I am trying to build a mex file in octave. The Octave instructions says that we need to use mkoctfile --mex to build one. The file I am trying to build is in the following path:
> C:\devwork\Octave\boosted\toolbox\channels\private\rgbConvert.cpp
When I write
> mkoctfile --mex rgbConvert.cpp
I get the following error:
> g++: error: rgbConvert.cpp: No such file or directory g++: fatal
> error: no input files compilation terminated.
Note: My current directory is set correct. It is at \devwork\Octave\boosted\toolbox\channels\private
Can some one explain me why am I getting this error.
The problem is resolved using: mkoctfile --mex -DMATLAB_MEX_FILE rgbConvertMex.cpp
Hence, if you want to convert any Matlab compiled .mex file to Octave executable file, do the following two steps:
Modify wrappers.hpp file by adding #include <stdlib.h>
Save the file.
Simply run: mkoctfile --mex -DMATLAB_MEX_FILE file_name
.o file will be created.
I did it using the same and it worked fine.
Eskapp was grateful enough to release the Octave compiled MEX files. You'll need to manually add the files to the main toolbox.Please find the link here:
https://github.com/Eskapp/Piotr_vision_extrafiles_Octave
Hope it helps others :)

Error using mex (g++ error: No such file or directory)

I'm trying to compile a library in Matlab (http://spams-devel.gforge.inria.fr/downloads.html) on Windows, using the given compile script, but am getting the following error.
Error using mex
g++: error: /c: No such file or directory
g++: error:
/FoC:\Users\Owner\AppData\Local\Temp\mex_4354548680745_632\mexArchetypalAnalysis.obj:
No such file or directory
Error in compile (line 456)
mex(args{:});
I'm stuck here. What's going wrong and how do I fix it?
I was facing the same problem in Windows.
Try changing CFLAGS to COMPFLAGS. It worked for me.
Source: https://github.com/cjlin1/libsvm/issues/55

fatal error: QScriptEngine: No such file or directory

I am working on blackberry project when i include
#include <QScriptEngine>
in my .cpp file it gives be error
fatal error: QScriptEngine: No such file or directory
can any one tell what should i include in .pro file so that i can get rid of this error .
Try replacing it with
#include <QtScript/QScriptEngine>
The qt4 include dir should be on your include path by default as long as you have CONFIG += qt somewhere in your pro file. So my guess is you just need to qualify where QScriptEngine is beneath the qt4 dir (which is inside QtScript dir).

mex compiler could not find include path in .h files

Hi I'm using MEX in Matlab.
The c code uses boost and a lot of headers are included.
And at first my problem is like this
>>mex readTrackletsMex.cpp
readTrackletsMex.cpp
e:\kitti\tools\devkit\matlab\tracklets.h(7) : fatal error C1083: can not open include file:“boost/serialization/nvp.hpp”: No such file or directory
This is because the include path is not specified. So I copied the headers into "/include/boost/XX" and added "-I" flag.
This time it seems that the compiler cannot find the include path in one of the header file.
>> mex -Iinclude readTrackletsMex.cpp
readTrackletsMex.cpp
include\boost/serialization/nvp.hpp(21) : fatal error C1083: can not open include file:“boost/config.hpp”: No such file or directory
Any idea on this? How do I specify a "global" include path for the compiler?
Thanks for your time.
You could try adding the include paths to the environment variables C_INCLUDE_PATH and CPLUS_INCLUDE_PATH. The other issue may be that you put in -Iinclude, and not -I/include

MATLAB include error : fatal error C1083: Cannot open include file: 'cblas.h'

I am using a optimization toolbox for solving sparse estimation problems. I have downloaded the software from SPAMS homepage and would like to create a mex-file from mexLasso.m for my application.
I transfer all the error-invoking include files to MATLAB external/include folder. In MATLAB, once I type in:
>> mex mexLasso.cpp
I receive this error:
C:\Program Files\MATLAB\R2012b\extern\include\utils.h(28)
fatal error C1083: Cannot open include file: 'cblas.h'
How can I solve this problem?
Thanks
For mex-ing: Have you setup your compiler?
>> mex -setup
Choose visual studio compiler over Matlab's lcc.
Do you have a header file cblas.h? where is it located?
Use the following flags to compile
>> mex -O -largeArrayDims -v mexLasso.cpp
The -v flag should give you a verbose output - see what are the include directories the compiler search in for header file. You can add folders to the search path with the flag -I <folder name>