mex

Linker error compiling mex with mingw-w64

ε祈祈猫儿з 提交于 2019-12-01 10:27:12
I'm trying to setup Mingw-w64 as the mex compiler in MATLAB 2013a. My laptop has x86_64 architecture and runs windows 7. The program I want to compile uses c++11-style threading, so I'm using mingw-w64 version 4.9.0 with posix threads. According to instruction I found here and here , I modified my mexopts.bat file. The code seems to compile successfully, but the linker reports an error. Does anyone have suggestions what I might be doing wrong? By the way, I tried using gnumex to setup the compiler, but that didn't work either. Here's the output and error message that MATLAB gives: >mex -v

Why is str2double so slow in matlab as compared to a mex-function?

删除回忆录丶 提交于 2019-12-01 10:11:32
my question is the title. Why is str2double so slow in matlab as compared to a mex function made in C/C++? Does matlab just not have good string handling capabilities? Can anyone give me some factual reasons as to why a mex function runs so many orders of magnitude faster? I was hoping to do a running time analysis of this difference but I don't have any concrete reasons from the code for matlab. Can you explain to me how I would open to file and actually look at the code written for the built in matlab str2double function? some postings on the topic: http://www.mathworks.com/matlabcentral

Error when compiling c++11 code in a Matlab mex file

孤街浪徒 提交于 2019-12-01 08:11:33
I have downloaded the following code : CVPR 2014 intersection over union optimization code cvpr2014-iou-code-1.0.zip http://research.microsoft.com/en-us/downloads/e164fe21-ef2b-4e34-98c1-4868968abb06/ What I get is an archive with two folders, one called src/ and another one called matlab/ . I am running Linux Fedora 19 and I can compile the code in src/ just fine. The problem arises when I try to compile the code in matlab/ . The README says: Matlab compilation ------------------ From within Matlab, configure the compiler using "mex -setup", then adjust the paths in matlab\compile_windows.m

Linker error compiling mex with mingw-w64

北战南征 提交于 2019-12-01 07:26:53
问题 I'm trying to setup Mingw-w64 as the mex compiler in MATLAB 2013a. My laptop has x86_64 architecture and runs windows 7. The program I want to compile uses c++11-style threading, so I'm using mingw-w64 version 4.9.0 with posix threads. According to instruction I found here and here, I modified my mexopts.bat file. The code seems to compile successfully, but the linker reports an error. Does anyone have suggestions what I might be doing wrong? By the way, I tried using gnumex to setup the

how can I make a mex function printf while it's running?

冷暖自知 提交于 2019-12-01 07:02:26
问题 I have a mex file called in my MATLAB script. The mex function may take a while to run, so in order to prevent my code from "stopping there without any outputs", I put many printf statements in the mex file to output some running information about the data being processed. But when I call the mex function, it doesn't printf anything and stays there during int's running. Finally, after finishing its work, it will printf all the information I want -- NOT while it is running but after finishing.

MATLAB MEX can't find standard library with XCode 4.3 (Mac)

微笑、不失礼 提交于 2019-12-01 05:26:55
I am getting started with using MEX files for MATLAB (R2012a) compiled from C code (using XCode 4.3) on my Mac (running OSX 10.7.3, Lion). I have already installed the MATLAB provided XCode patch which configures MATLAB to use the new llvm-gcc compiler under XCode 4.2+, but I am still getting the following error attempting to compile the example file using mex timestwo.c : /Applications/MATLAB_R2012a.app/extern/include/matrix.h:852:20: error: stdlib.h: No such file or directory In file included from timestwo.c:1: /Applications/MATLAB_R2012a.app/extern/include/mex.h:161:19: error: stdio.h: No

Version GLIBCXX_3.4.11 not found (required by buildW.mexglx)

徘徊边缘 提交于 2019-12-01 04:01:39
I am trying to compile a c++ ubuntu project via matlab here . When I am trying to use it after the compilation with make command, I am getting the following error: Invalid MEX-file '////fashionista_v0.2/lib/+bsr/buildW.mexglx': //local/MATLAB/R2011a/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ////fashionista_v0.2/lib/+bsr/buildW.mexglx) I am not familiar with those processes, so I couldnt understand the several proposed solutions like that . What is exactly libstdc++ and GLIBCXX and how can I solve the problem? I am trying to fix the problem

MATLAB MEX can't find standard library with XCode 4.3 (Mac)

主宰稳场 提交于 2019-12-01 03:20:41
问题 I am getting started with using MEX files for MATLAB (R2012a) compiled from C code (using XCode 4.3) on my Mac (running OSX 10.7.3, Lion). I have already installed the MATLAB provided XCode patch which configures MATLAB to use the new llvm-gcc compiler under XCode 4.2+, but I am still getting the following error attempting to compile the example file using mex timestwo.c : /Applications/MATLAB_R2012a.app/extern/include/matrix.h:852:20: error: stdlib.h: No such file or directory In file

Error: Invalid MEX file, the specified module could not be found

自古美人都是妖i 提交于 2019-12-01 03:10:46
I have compiled Mex file successfully on my laptop. But when I am running it, it says Invalid mex file 'c:\newfolder\filename.mexw32' The specified module could not be found . System specification: OS: windows 7 MATLAB 2010a Microsoft Visual Studio 2008. The same mex file is compiled and run successfully on my PC under XP SP3. This MathWorks support link suggests two possible reasons to your problem: You do not have all of the necessary libraries that the MEX-function is dependent upon. You are running a MEX-file on a different version of MATLAB than it was compiled on. Either way, to locate

Version GLIBCXX_3.4.11 not found (required by buildW.mexglx)

扶醉桌前 提交于 2019-12-01 01:49:07
问题 I am trying to compile a c++ ubuntu project via matlab here. When I am trying to use it after the compilation with make command, I am getting the following error: Invalid MEX-file '////fashionista_v0.2/lib/+bsr/buildW.mexglx': //local/MATLAB/R2011a/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ////fashionista_v0.2/lib/+bsr/buildW.mexglx) I am not familiar with those processes, so I couldnt understand the several proposed solutions like that.