<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257807</link>
    <title>MATLAB Central Newsreader - Error from using  dgecon of LAPACK and BLAS in R2009a</title>
    <description>Feed for thread: Error from using  dgecon of LAPACK and BLAS in R2009a</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 05 Aug 2009 07:08:01 -0400</pubDate>
      <title>Error from using  dgecon of LAPACK and BLAS in R2009a</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257807#670719</link>
      <author>Renwen Lin</author>
      <description>I try to write down a mex file using and , in Matlab R2009a. &lt;br&gt;
But get error LNK2019.&lt;br&gt;
I have tried such codes in R2008b, there no such errors.&lt;br&gt;
I am looking forward your help. &lt;br&gt;
&lt;br&gt;
-----------------------My code---------------------------&lt;br&gt;
#include &quot;mex.h&quot;&lt;br&gt;
#include &quot;matrix.h&quot;&lt;br&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br&gt;
#include &quot;blas.h&quot;&lt;br&gt;
#include &amp;lt;math.h&amp;gt;&lt;br&gt;
#include &amp;lt;string.h&amp;gt;&lt;br&gt;
&lt;br&gt;
void dgetrf(const int *M, const int *N, double A[], const int *LDA, &lt;br&gt;
		      int IPIV[], int *INFO);&lt;br&gt;
void dgecon(const char *NORM, const int *N, const double A[],&lt;br&gt;
		      const int *LDA, const double *ANORM, double *RCOND, double WORK[], &lt;br&gt;
		      int IWORK[], int *INFO);&lt;br&gt;
void mexFunction(int nlhs, mxArray *plhs[],  int nrhs, const mxArray *prhs[])&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;.. code that call dgetrf and dgecon&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
-----------------------My command in Matlab -----------------&lt;br&gt;
mex ndbackslash.cpp &quot;D:\Program Files\MATLAB\R2009a\extern\lib\win64\microsoft\libmwlapack.lib&quot; &quot;D:\Program Files\MATLAB\R2009a\extern\lib\win64\microsoft\libmwblas.lib&quot;&lt;br&gt;
&lt;br&gt;
-----------------------Debug errors -----------------&lt;br&gt;
C:\USERS\ALIN\APPDATA\LOCAL\TEMP\MEX_O9~1\ndbackslash.obj D:\PROGRA~2\MATLAB\R2009A\EXTERN\LIB\WIN64\MICROS~1\libmwlapack.lib D:\PROGRA~2\MATLAB\R2009A\EXTERN\LIB\WIN64\MICROS~1\libmwblas.lib  &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Creating library C:\USERS\ALIN\APPDATA\LOCAL\TEMP\MEX_O9~1\templib.x and object C:\USERS\ALIN\APPDATA\LOCAL\TEMP\MEX_O9~1\templib.exp &lt;br&gt;
ndbackslash.obj : error LNK2019: unresolved external symbol &quot;void __cdecl dgecon(char const *,int const *,double const * const,int const *,double const *,double *,double * const,int * const,int *)&quot; (?dgecon@@YAXPEBDPEBHQEBN1PEBNPEANQEANQEAHPEAH@Z) referenced in function &quot;void __cdecl compute_lu(double *,int,int *,double *,int *,int)&quot; (?compute_lu@@YAXPEANHPEAH01H@Z) &lt;br&gt;
ndbackslash.obj : error LNK2019: unresolved external symbol &quot;void __cdecl dgetrf(int const *,int const *,double * const,int const *,int * const,int *)&quot; (?dgetrf@@YAXPEBH0QEAN0QEAHPEAH@Z) referenced in function &quot;void __cdecl compute_lu(double *,int,int *,double *,int *,int)&quot; (?compute_lu@@YAXPEANHPEAH01H@Z) &lt;br&gt;
ndbackslash.mexw64 : fatal error LNK1120: 2 unresolved externals &lt;br&gt;
&lt;br&gt;
NB:  error LNK2019: unresolved external symbol &quot;void __cdecl dgecon</description>
    </item>
    <item>
      <pubDate>Wed, 05 Aug 2009 10:25:03 -0400</pubDate>
      <title>Re: Error from using  dgecon of LAPACK and BLAS in R2009a</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257807#670761</link>
      <author>Bruno Luong</author>
      <description>&quot;Renwen Lin&quot; &amp;lt;linrenwen@gmail.com&amp;gt; wrote in message &amp;lt;h5bb4h$ee8$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I try to write down a mex file using and , in Matlab R2009a. &lt;br&gt;
&amp;gt; But get error LNK2019.&lt;br&gt;
&amp;gt; I have tried such codes in R2008b, there no such errors.&lt;br&gt;
&amp;gt; I am looking forward your help. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -----------------------My code---------------------------&lt;br&gt;
&amp;gt; #include &quot;mex.h&quot;&lt;br&gt;
&amp;gt; #include &quot;matrix.h&quot;&lt;br&gt;
&amp;gt; #include &amp;lt;stdlib.h&amp;gt;&lt;br&gt;
&amp;gt; #include &quot;blas.h&quot;&lt;br&gt;
&amp;gt; #include &amp;lt;math.h&amp;gt;&lt;br&gt;
&amp;gt; #include &amp;lt;string.h&amp;gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; void dgetrf(const int *M, const int *N, double A[], const int *LDA, &lt;br&gt;
&amp;gt; 		      int IPIV[], int *INFO);&lt;br&gt;
&amp;gt; void dgecon(const char *NORM, const int *N, const double A[],&lt;br&gt;
&amp;gt; 		      const int *LDA, const double *ANORM, double *RCOND, double WORK[], &lt;br&gt;
&amp;gt; 		      int IWORK[], int *INFO);&lt;br&gt;
&amp;gt; void mexFunction(int nlhs, mxArray *plhs[],  int nrhs, const mxArray *prhs[])&lt;br&gt;
&amp;gt; {&lt;br&gt;
&amp;gt;    .. code that call dgetrf and dgecon&lt;br&gt;
&amp;gt; }&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -----------------------My command in Matlab -----------------&lt;br&gt;
&amp;gt; mex ndbackslash.cpp &quot;D:\Program Files\MATLAB\R2009a\extern\lib\win64\microsoft\libmwlapack.lib&quot; &quot;D:\Program Files\MATLAB\R2009a\extern\lib\win64\microsoft\libmwblas.lib&quot;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -----------------------Debug errors -----------------&lt;br&gt;
&amp;gt; C:\USERS\ALIN\APPDATA\LOCAL\TEMP\MEX_O9~1\ndbackslash.obj D:\PROGRA~2\MATLAB\R2009A\EXTERN\LIB\WIN64\MICROS~1\libmwlapack.lib D:\PROGRA~2\MATLAB\R2009A\EXTERN\LIB\WIN64\MICROS~1\libmwblas.lib  &lt;br&gt;
&amp;gt;    Creating library C:\USERS\ALIN\APPDATA\LOCAL\TEMP\MEX_O9~1\templib.x and object C:\USERS\ALIN\APPDATA\LOCAL\TEMP\MEX_O9~1\templib.exp &lt;br&gt;
&amp;gt; ndbackslash.obj : error LNK2019: unresolved external symbol &quot;void __cdecl dgecon(char const *,int const *,double const * const,int const *,double const *,double *,double * const,int * const,int *)&quot; (?dgecon@@YAXPEBDPEBHQEBN1PEBNPEANQEANQEAHPEAH@Z) referenced in function &quot;void __cdecl compute_lu(double *,int,int *,double *,int *,int)&quot; (?compute_lu@@YAXPEANHPEAH01H@Z) &lt;br&gt;
&amp;gt; ndbackslash.obj : error LNK2019: unresolved external symbol &quot;void __cdecl dgetrf(int const *,int const *,double * const,int const *,int * const,int *)&quot; (?dgetrf@@YAXPEBH0QEAN0QEAHPEAH@Z) referenced in function &quot;void __cdecl compute_lu(double *,int,int *,double *,int *,int)&quot; (?compute_lu@@YAXPEANHPEAH01H@Z) &lt;br&gt;
&amp;gt; ndbackslash.mexw64 : fatal error LNK1120: 2 unresolved externals &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; NB:  error LNK2019: unresolved external symbol &quot;void __cdecl dgecon&lt;br&gt;
&lt;br&gt;
You probably have to use stdcall convention.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Wed, 05 Aug 2009 12:00:19 -0400</pubDate>
      <title>Re: Error from using  dgecon of LAPACK and BLAS in R2009a</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257807#670784</link>
      <author>Renwen Lin</author>
      <description>Bruno,   Thanks so much,&lt;br&gt;
&lt;br&gt;
After read few introductions of _stdcall.  I think A   __stdcall  is supposed to deal with function's  arguments, and I can not understood why it is needed here. It seems my problem is mex compile can not identify the function rather than its arguments.  &lt;br&gt;
&lt;br&gt;
Hope you can explain it a little more for me.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Lin Renwen  </description>
    </item>
    <item>
      <pubDate>Wed, 05 Aug 2009 12:29:02 -0400</pubDate>
      <title>Re: Error from using  dgecon of LAPACK and BLAS in R2009a</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257807#670788</link>
      <author>Bruno Luong</author>
      <description>&quot;Renwen Lin&quot; &amp;lt;linrenwen@gmail.com&amp;gt; wrote in message &amp;lt;h5bs8j$6pd$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Bruno,   Thanks so much,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; After read few introductions of _stdcall.  I think A   __stdcall  is supposed to deal with function's  arguments, and I can not understood why it is needed here. It seems my problem is mex compile can not identify the function rather than its arguments.  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hope you can explain it a little more for me.&lt;br&gt;
&lt;br&gt;
The calling convention affects how arguments are put on the stack, but also have the function name are decorated and exported.&lt;br&gt;
&lt;br&gt;
There is a tool to inspect what are the function names in a library. I can't recall it right now.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Wed, 05 Aug 2009 13:39:02 -0400</pubDate>
      <title>Re: Error from using  dgecon of LAPACK and BLAS in R2009a</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257807#670805</link>
      <author>Steve Amphlett</author>
      <description>&quot;Bruno Luong&quot; &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;h5btue$rea$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Renwen Lin&quot; &amp;lt;linrenwen@gmail.com&amp;gt; wrote in message &amp;lt;h5bs8j$6pd$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Bruno,   Thanks so much,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; After read few introductions of _stdcall.  I think A   __stdcall  is supposed to deal with function's  arguments, and I can not understood why it is needed here. It seems my problem is mex compile can not identify the function rather than its arguments.  &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Hope you can explain it a little more for me.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The calling convention affects how arguments are put on the stack, but also have the function name are decorated and exported.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; There is a tool to inspect what are the function names in a library. I can't recall it right now.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Bruno&lt;br&gt;
&lt;br&gt;
Depends on the platform.  For Windows it's &quot;depends&quot; for UNIX, &quot;nm&quot;.  Also bear in mind that the naming convention may dgecon_ a common way to mix C with FORTRAN.</description>
    </item>
    <item>
      <pubDate>Thu, 06 Aug 2009 02:59:07 -0400</pubDate>
      <title>Re: Error from using  dgecon of LAPACK and BLAS in R2009a</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257807#671016</link>
      <author>Renwen Lin</author>
      <description>I have identify the problem.&lt;br&gt;
My purpose is to solve X from A*X =B;&lt;br&gt;
&lt;br&gt;
The first thing I need is LU decomposition of A.&lt;br&gt;
&lt;br&gt;
Matlab use DGETRF caling DGECON for LU-decomposition in early version.  But Use DGETRF calling DLACN2 in R2009a.&lt;br&gt;
&lt;br&gt;
Thanks!&lt;br&gt;
&lt;br&gt;
Lin Renwen</description>
    </item>
    <item>
      <pubDate>Thu, 06 Aug 2009 08:17:02 -0400</pubDate>
      <title>Re: Error from using  dgecon of LAPACK and BLAS in R2009a</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257807#671056</link>
      <author>Renwen Lin</author>
      <description>&lt;br&gt;
Hi  Bruno,&lt;br&gt;
&lt;br&gt;
Thanks a lot :)&lt;br&gt;
&lt;br&gt;
I think I understood some about your words. &lt;br&gt;
&lt;br&gt;
and I find the functions in lib by checking &amp;lt;blas.h&amp;gt; in '\extern\include&amp;#092;' fileflip.&lt;br&gt;
&lt;br&gt;
Lin Renwen</description>
    </item>
  </channel>
</rss>

