Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: mex compile of matrixMultiply.c in MATLAB/R2012a/extern/examples/refbook fails
Replies: 1   Last Post: Feb 13, 2013 11:33 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
James Tursa

Posts: 1,969
Registered: 8/5/09
Re: mex compile of matrixMultiply.c in MATLAB/R2012a/extern/examples/refbook fails
Posted: Feb 13, 2013 11:33 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"shome" wrote in message <kffq56$j3$1@newscl01ah.mathworks.com>...
> In /usr/local/MATLAB/R2012a/extern/examples/refbook there are a few c files.all compiled with command mex filename.c except files with blas or lapak headers.One such example is shown below:
>

> >> mex matrixMultiply.c
>
> Warning: You are using gcc version "4.6.3-1ubuntu5)". The version
> currently supported with MEX is "4.4.6".
> For a list of currently supported compilers see:
> http://www.mathworks.com/support/compilers/current_release/
>
> In file included from matrixMultiply.c:19:0:
> /usr/local/MATLAB/R2012a/extern/include/blas.h:595:0: warning: "dgemm" redefined [enabled by default]
> matrixMultiply.c:15:0: note: this is the location of the previous definition
> matrixMultiply.o: In function `mexFunction':
> matrixMultiply.c:(.text+0xf7): undefined reference to `dgemm_'
> collect2: ld returned 1 exit status
>
> mex: link of ' "matrixMultiply.mexa64"' failed.
>

> > In mex_helper at 36
> In mex at 204
> Error using mex (line 206)
> Unable to complete successfully.
>
> Kindly advise


You may need to explicitly point it to the BLAS library. E.g.,

mex -lmwblas matrixMultiply.c

James Tursa



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2013. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.