f



7.0 vs. 6.5: (matlab 7.0 does not work) question on using MSVC matlab add-in to generate m-dll to speed-up my program

Dear all,

I was using Matlab 6.5 MSVC matlab add-in macro to generate m-MEX-dll used
in Matlab for speeding-up my program.

I created a new "matlab project" in MSVC 6.0. Then load the m-file
"ProcessBitmap.m" which is the m-file I want to convert into MEX dll to use
in the matlab command line.

Then I built the "dll" file in MSVC 6.0. The generated "ProcessBitmap.dll"
can be successfully used in matlab 6.5 command line without any trouble. It
can be used inside the matlab command line. Even if I delete the original
"m-file", the "ProcessBitmap.dll" can still be invoked inside the matlab
environment.

But recently we upgraded to Matlab 7.0. In the matlab 7.0 environment,
invoking the same "ProcessBitmap.dll" results in the following error:

----------------------------------------------------
>> ProcessBitmap
Unable to load mex file: C:\My Works\ScratchArea\mycode\ProcessBitmap.dll.
The specified procedure could not be found.


??? Invalid MEX-file 'C:\My Works\ScratchArea\mycode\ProcessBitmap.dll': The
specified procedure could not be found.

..
----------------------------------------------------

I have put this into the system path by adding this into the path
environment variable on Windows XP. And I restarted matlab 7.0.

What's the problem?

Please help me! Thanks a lot.

-Gino


0
mizhael (177)
7/28/2004 6:42:41 AM
comp.soft-sys.matlab 211266 articles. 18 followers. lunamoonmoon (258) is leader. Post Follow

2 Replies
2063 Views

Similar Articles

[PageSpeed] 51

Hi Gino,
the problem is, that MEX files are not (binary) compatible between different
versions.
So you would need to recompile for a new version.
Since R14 the MATLAB compiler does not compile to MEX functions, because you
are not gaining any speed doing so. If speed is your concern, you will be
much better
off using the profiler to speed up your MATLAB code.

Titus

"gino" <mizhael@yahoo.com> wrote in message
news:ce7ht1$ru2$1@news.Stanford.EDU...
> Dear all,
>
> I was using Matlab 6.5 MSVC matlab add-in macro to generate m-MEX-dll used
> in Matlab for speeding-up my program.
>
> I created a new "matlab project" in MSVC 6.0. Then load the m-file
> "ProcessBitmap.m" which is the m-file I want to convert into MEX dll to
use
> in the matlab command line.
>
> Then I built the "dll" file in MSVC 6.0. The generated "ProcessBitmap.dll"
> can be successfully used in matlab 6.5 command line without any trouble.
It
> can be used inside the matlab command line. Even if I delete the original
> "m-file", the "ProcessBitmap.dll" can still be invoked inside the matlab
> environment.
>
> But recently we upgraded to Matlab 7.0. In the matlab 7.0 environment,
> invoking the same "ProcessBitmap.dll" results in the following error:
>
> ----------------------------------------------------
> >> ProcessBitmap
> Unable to load mex file: C:\My Works\ScratchArea\mycode\ProcessBitmap.dll.
> The specified procedure could not be found.
>
>
> ??? Invalid MEX-file 'C:\My Works\ScratchArea\mycode\ProcessBitmap.dll':
The
> specified procedure could not be found.
>
> .
> ----------------------------------------------------
>
> I have put this into the system path by adding this into the path
> environment variable on Windows XP. And I restarted matlab 7.0.
>
> What's the problem?
>
> Please help me! Thanks a lot.
>
> -Gino
>
>


0
tedelhof (480)
7/28/2004 7:17:01 AM
Titus Edelhofer wrote:
> 
> Hi Gino,
> the problem is, that MEX files are not (binary) compatible between different
> versions.
> So you would need to recompile for a new version.
> Since R14 the MATLAB compiler does not compile to MEX functions, because you
> are not gaining any speed doing so. If speed is your concern, you will be
> much better
> off using the profiler to speed up your MATLAB code.
> 
> Titus
> 
[snip]

MATLAB 7 can work with .dll files compiled for MATLAB 6.5, but you might
need to help it out a bit to make sure it finds the right versions of
any other .dll files it depends upon.

One way to achieve this is to statically link the .dll when you cimpile
it with MATLAB 6.5.  This will make a larger .dll, but it will be
essentially self contained.  Perhaps not the best solution for
everything, but an easy fix for many tasks.

Use mex -n to see what the command line is going to the compiler.  Look
for the /M? flag, and set it to /MT to statically link.  (I can't recall
what it is by default, and my laptop is far away at the moment.)  You
might want to compile by hand, or create a batch file to do this, or of
course you could play with the mex script.

I do this to get around a problem with compatability issues between
MATLAB 6.5 and 7.0.  MATLAB 6.5 shipped with msvcr70.dll, but MATLAB 7.0
ships with msvcr71.dll, which is not what my version of MSVC wants to
use, and I am not in the mood to upgrade Microsoft products this week.


-- 
Dr Tristram J. Scott               
Energy Consultant
0
7/28/2004 4:03:13 PM
Reply:

Similar Artilces:

How to use MATLAB 4.0/5.0 programs in MATLAB 7.0 environment.
hi, I will be very grateful if somebody tell me how to run MATLAB 4.0/5.0 programs in MATLAB 7.0.4. I was trying to run but it shows error. Thank you. With Regards, Binod Prasad Koirala And the error says .... KWs`ef}c}n,m_}___im}r}mrfmcs%arkg}cn>f}mljglmjtk`cwa__}C_%8 "Matt Fig" <spamanon@yahoo.com> wrote in message <gmkhie$p1k$1@fred.mathworks.com>... > And the error says .... > > > > > KWs`ef}c}n,m_}___im}r}mrfmcs%arkg}cn>f}mljglmjtk`cwa__}C_%8 The error says.... At compilation, "ybus" was determined to be a variable an...

bar
In MatLab 6.5, the routine above works normal: figure; sem=Average(:,2)./sqrt(Average(:,3)); bar([1:1:7],Average(:,1),sem); ylabel('% of epochs analyzed') xlabel('Frequency Band') title ('Occurrence of Oscillatory Events - Ch X') %Where Average and sem are vectors; But, in MatLab 7.0, the same code cause the following error: ??? Error using ==> xychk Too many input arguments. Error in ==> bar at 53 [msg,x,y] = xychk(args{1:nargs},'plot'); Error in ==> cross_subj_analysis>ok_Callback at 327 bar([1:1:7],Average(:,1),sem); I'd like to know w...

some problems of codes of MATLAB 7.0 working on MATLAB 6.5
I have used MATLAB for few hours.So I don't know the differences between version 6.5 and 7.0.I want to use some codes of MATLAB 7.0, but they doesn't work in MATLAB 6.5.How to change these codes so that they can work in matlab 6.5.Waiting for your help. Thank you . The codes are like this .I think changing the function findPI may work ,but I don'y know how % PIfun.m % Evaluate a function used to find the PI-line, using Kyle Champley's % method. % % Adam Wunderlich % last update: 5/18/06 function y = PIfun(r,R,h,gamma,x3,sb) temp = R - r*cos(gamma-sb); y = h*((pi - 2*atan(...

Using Matlab 6.5 To load Matlab 7.0 Figures
As suggested in my subject I am trying to use Matlab 6.5 to load a Matlab 7.0 updated .fig file. The command I am using is: hgload filename; the error I recieve is: ??? Error using ==> load Unable to read MAT file z:\xbr_prop\proptool\V7.0.6\PROP\xbr_tool_prop_fig3.fig See FILEFORMATS for a list of known file types and the functions used to read them. Error in ==> \\Resbed-easrv\MATLAB6p5\toolbox\matlab\iofun\hgload.m On line 45 ==> fileVars = load(filename,'-mat'); Error in ==> z:\xbr_prop\proptool\V7.0.6\PROP\prop_7_gui.m On line 2 ==> hgload xbr_tool_prop_fig3;...

Using matlab 7 DLL with delphi 6.0
After a lot of time and trying I finaly got Delphi 6 to interface a matlab 7 dll. The file contains the matlab code that is compiled into the DLL. The compile.m file holds the MCC command-line for compiling the DLL. In the delphi folder the source code for the delphi project. Its not the best of code, but it shows : 1) Passing two scalars to the DLL and get two scalars back ( test1 ) 2) Passing one array and get one array back ( test2 ) To run this you might need to install the runtime engine for matlab, found in : C:\MATLAB7\toolbox\compiler\deploy\win32\MCRInstaller.exe ( not attached )...

Re: Using matlab 7 DLL with delphi 6.0
I want!Can you give me a copy?Thank you! ...

different results in function regress from MATLAB 6.5 to MATLAB 7.0
Hello , anybody knows when I execute the function "regress" to this model (STAR(1)) Yt = 1 - 0-5Yt-1 - (4 + 0.4Yt-1)G(gamma*Yt-1) + et, where G(z) =1/ [1 + exp(-z)], gamma=4; et=N(0,1) I obtain different radically different results from matlab 6.5 to matlab 7.0 that with other models??Any suggestion to avoid this problem??? On May 25, 4:40=A0am, "Kun Aguero" <isildur20022...@yahoo.es> wrote: > Hello , anybody knows when I execute the function "regress" to this model= (STAR(1)) > Yt =3D 1 - 0-5Yt-1 - (4 + 0.4Yt-1)G(gamma*Yt-1) + et, where G(z) =3D1/ ...

Incompatible of MAT file for Matlab 6.5.1 and Matlab 7.0
Hi! I have recently installed Matlab 7.0. I have save my simulation results in .MAT file. However, these MAT files can't be opened using Matlab 6.5.1. I encountered problem as follows: ??? Error using ==> load Unable to read MAT file D:\MATLAB7\work\results.mat File may be corrupt. How can I solve this problem? Thanks. Linda Please see here: <http://tx.technion.ac.il/~perryb/matlab7/mat7.pdf> In short, save again as: The new features and enhancements are described in the "Release notes" of Matlab. A new feature that causes incompat...

which built-in function in Matlab 7.0.4 can replace the 'imfilter' in Matlab 7.0
I'm trying to do an edge detection using Matlab 7.0.4, is there any built-in function can replace 'imfilter' in Matlab 7.0 ? thz a lot. Hi, should still be there in the image processing toolbox. Do you have it installed on your 7.0.4-version? Titus <tylyeung@gmail.com> schrieb im Newsbeitrag news:1149965596.493689.33070@h76g2000cwa.googlegroups.com... > I'm trying to do an edge detection using Matlab 7.0.4, > is there any built-in function can replace 'imfilter' in Matlab 7.0 ? > thz a lot. > ...

Re: Incompatible of MAT file for Matlab 6.5.1 and Matlab 7.0
You can find a file converter here: <http://www.codebuildingblocks.com/MatVersionConverter/> ...

Problems in using fmincon.m and nlconst.m in Matlab 7.5.0 (R2007b)
Hi All I have been trying to use "fmincon.m" in Matlab version 7.5.0 (R2007b) and getting the following errors: ------------- ??? Undefined function or method 'ge' for input arguments of type 'struct'. Error in ==> nlconst at 85 if DiffMinChange >= DiffMaxChange Error in ==> fmincon at 562 [X,FVAL,lambda,EXITFLAG,OUTPUT,GRAD,HESSIAN]=... .... ------------------ As far as I can understand there seems to be no problem in "nlconst.m" at line 85. Is it a unreported bug or something else ? I have not touched "DiffMaxChange" in optimset.......

TF in Matlab 7 vs Matlab 6.5
Hi, I was using the TF function sucessfully in Matlab 6.5 inorder to calculate a transfer function. However when i use the code with Matlab 7 i get an error, since the TF function seems to have changed. I need to use it with matlab 7 since i want to use the ilaplace function which I dont have on matlab 6.5. Any ideas? Its ft on the other one a**hole ! "Christopher White" <christopherwhite.is@gmail.com> wrote in message news:ef1be03.-1@webx.raydaftYaTP... > Hi, > I was using the TF function sucessfully in Matlab 6.5 inorder to > calculate a transfer function. Howeve...

error using matlab script block with matlab 7.0
Hello, &nbsp; I'm using along several months in my vi's the matlab script block using 6.1 and 6.5 matlab script version and I haven't got any problem. Today I've installed matlab 7.0 and the matlab script block, but matlab script block never shows errors and I dont' know whyit happens. &nbsp; Someone knows which can be the problem.....is not compatible with matlab 7.0....i have to update labview?? &nbsp; Thanks &nbsp; Larson Thank you very much diego....i haven't found this forum topic. &nbsp; Bye! ...

Problem running exe compiled using Matlab Compiler 7.6 on a PC with Matlab 6.5
Hi, I have some Matlab code which I compiled using Matlab Compiler 7.6. Using the MCRInstaller and the Visual C++ Runtime library, I was able to install MCR 7.6 on the client machine. However, the client machine already had Matlab 6.5. Now when I try to run my exe, I get the following error message: Fatal error finding symbol mxCalcSingleSubscript_76 in c:\matlab6p5\bin\win32\libmx.dll I understand that the error shows up since the exe tries to go and look for the necessary information in the win32 folder for Matlab 6.5 rather than the v76 folder for the runtime. Can anyone give ...

Web resources about - 7.0 vs. 6.5: (matlab 7.0 does not work) question on using MSVC matlab add-in to generate m-dll to speed-up my program - comp.soft-sys.matlab

West Lothian question - Wikipedia, the free encyclopedia
He illustrated his point by pointing out the absurdity of a Member of Parliament for West Lothian being able to vote on matters affecting the ...

Bloomberg editor quits over questions of aggressive-enough coverage of boss
A Bloomberg News editor quit fearing the agency won't be aggressive enough covering the fledgling White House campaign by her billionaire boss, ...

Bret Baier: ‘It’s Not Our Job To Take Somebody Off A Stage With Tough Questions’
Megyn Kelly will be there, so will Chris Wallace and Bret Baier , and most of the GOP candidates. The frontrunner, however, will not take part ...

Submit your questions for Autoblog Podcast #464
Filed under: Podcasts On Episode #464 of the Autoblog Podcast, we'll look back at the Detroit Auto Show and forward to Geneva. We've also got ...

How much do you need to read about Zika virus before you scream "no" to the question "Would it be wrong ...
"More than a million people, mostly from poorer nations, die each year from mosquito-borne diseases including malaria, dengue fever and yellow ...

WE GOT A BLEEDER! Donald Trump Bails out of GOP Debate, Fearing Questions From... Megyn Kelly
I find it somewhat odd that a man who fancies himself a master negotiator ready to face the world's toughest dictators is so fearful of questions ...

Chicago Board of Education Yanks $875 Million Bond Sale Over 7.75% Yield; Five Questions for Chicago
On Wednesday, the Chicago Board of education pulled the plug on a proposed $875 Million Bond Sale . Facing hefty yields, the financially ailing ...

13 interview questions you might have to answer if you want the 'best job in America'
Data scientist is the best job in America in 2016 , according to a recent report from Glassdoor . The top ranking was based on Glassdoor's analysis ...

3 companies that raise questions about the Trump brand
Two are multilevel marketing operations and one a "university," but a lot of people lost money at all of them

Oracle raises questions on open-source license for Android with OpenJDK
Oracle has raised questions whether a version of Google's Android operating system running OpenJDK code will get an open-source license. Google ...

Resources last updated: 1/28/2016 2:18:11 PM