Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
C compiler error

Subject: C compiler error

From: Mateusz Gos

Date: 20 Oct, 2010 17:01:10

Message: 1 of 2

I have got Windows 7, Matlab 2010b. The error I am getting is as follows:

>> mbuild yprime.c
cannot open output file yprime.exe:
 
  C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Link of 'yprime.exe' failed.
 
??? Error using ==> mbuild at 189
Unable to complete successfully.

Line 189 is part of the following block:
try
    [varargout{1:nargout}]=mbuild_helper(varargin{:});
catch ex
    throw(ex); %line 189
end

Entering mbuild -setup does not report any problems, but then mbuild -v breaks at line 189 again... The progrem I compiled via diploytool does literally nothing - I click the exe file and nothing happens. I will greatly appreciate any advice.

Mateusz

Subject: C compiler error

From: Steven_Lord

Date: 20 Oct, 2010 17:45:34

Message: 2 of 2



"Mateusz Gos" <webmaster24@wp.pl> wrote in message
news:i9n78m$sv7$1@fred.mathworks.com...
> I have got Windows 7, Matlab 2010b. The error I am getting is as follows:
>
>>> mbuild yprime.c

Instead of using MBUILD, I'm pretty sure you want to use MEX instead.

> cannot open output file yprime.exe:

That suggests to me that you're attempting to build this MEX-file in a
directory in which you do not have write permission. CD to a different
directory, one in which you know you can create files, copy yprime.c to that
directory, and try again.

> C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Link of 'yprime.exe' failed.
> ??? Error using ==> mbuild at 189
> Unable to complete successfully.
>
> Line 189 is part of the following block:
> try
> [varargout{1:nargout}]=mbuild_helper(varargin{:});
> catch ex
> throw(ex); %line 189
> end
>
> Entering mbuild -setup does not report any problems, but then mbuild -v
> breaks at line 189 again... The progrem I compiled via diploytool does
> literally nothing - I click the exe file and nothing happens. I will
> greatly appreciate any advice.

If you're using the yprime.c example from the documentation, you need to
call it with two input arguments; if I remember correctly the first must be
a scalar and the latter a 4-element column vector. In MATLAB, type:

a = yprime(0.1, [1; 2; 3; 4])

and see if you receive an output.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us