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:
ndfun error

Subject: ndfun error

From: Dave Brackett

Date: 1 Aug, 2008 16:25:03

Message: 1 of 5

I have been using the ndfun mex file by Peter Boettcher to
find the product of many 2x2 matrices but since installing
Matlab R2007a again on a new machine (64bit), i can no
longer run ndfun from my unchanged code. I get this error:

??? Undefined function or method 'ndfun' for input
arguments of type 'char'.

Any idea how I can resolve this? Thanks

Subject: ndfun error

From: Steven Lord

Date: 4 Aug, 2008 14:51:03

Message: 2 of 5


"Dave Brackett" <davebrackett@hotmail.com> wrote in message
news:g6vdcv$6n6$1@fred.mathworks.com...
>I have been using the ndfun mex file by Peter Boettcher to
> find the product of many 2x2 matrices but since installing
> Matlab R2007a again on a new machine (64bit), i can no
> longer run ndfun from my unchanged code. I get this error:
>
> ??? Undefined function or method 'ndfun' for input
> arguments of type 'char'.
>
> Any idea how I can resolve this? Thanks

MEX-files are platform specific -- if the new machine is not the same
architecture (for instance, if the old machine was 32-bit Linux or Windows
and the new one is 64-bit Linux or Windows) you will need to recompile the
MEX-file or use the appropriate one for the new machine's architecture (look
at MEXEXT to determine which one should be present.)

--
Steve Lord
slord@mathworks.com

Subject: ndfun error

From: Dave Brackett

Date: 12 Aug, 2008 16:10:03

Message: 3 of 5

Ok, I have tried recompiling it for 64bit windows xp but
get the following errors: does any one know what my next
step should be? thanks.

C:\DOCUME~1\DJB\LOCALS~1\Temp\mex_F231598E-534E-40A5-5C9F-
325132C012E1\ndfun.obj
   Creating library C:\DOCUME~1\DJB\LOCALS~1
\Temp\mex_F231598E-534E-40A5-5C9F-325132C012E1\templib.x
and object C:\DOCUME~1\DJB\LOCALS~1\Temp\mex_F231598E-534E-
40A5-5C9F-325132C012E1\templib.exp
ndfun.obj : error LNK2019: unresolved external symbol
dgecon referenced in function compute_lu
ndfun.obj : error LNK2019: unresolved external symbol
dgetrf referenced in function compute_lu
ndfun.obj : error LNK2019: unresolved external symbol dgeev
referenced in function mexFunction
ndfun.obj : error LNK2019: unresolved external symbol
dgetri referenced in function mexFunction
ndfun.obj : error LNK2019: unresolved external symbol
dgetrs referenced in function mexFunction
ndfun.obj : error LNK2019: unresolved external symbol zgemm
referenced in function mexFunction
ndfun.obj : error LNK2019: unresolved external symbol dgemm
referenced in function mexFunction
ndfun.mexw64 : fatal error LNK1120: 7 unresolved externals

Subject: ndfun error

From: renwen

Date: 21 Jul, 2009 08:33:03

Message: 4 of 5

I meet the same problem as you.
And resolve it by run fellowing command in matlab:

mex ndfun.c "D:\Program Files\MATLAB\R2008b\extern\lib\win64\microsoft\libmwlapack.lib" "D:\Program Files\MATLAB\R2008b\extern\lib\win64\microsoft\libmwblas.lib"

PC : Vista X 64 with AMD 2-core CPU.
Matlab: R2008b
VC++: Visual St. 2008

Subject: ndfun error

From: Renwen Lin

Date: 21 Jul, 2009 08:37:01

Message: 5 of 5

"Dave Brackett" <davebrackett@hotmail.com> wrote in message <g7sckr$hha$1@fred.mathworks.com>...
> Ok, I have tried recompiling it for 64bit windows xp but
> get the following errors: does any one know what my next
> step should be? thanks.
>
> C:\DOCUME~1\DJB\LOCALS~1\Temp\mex_F231598E-534E-40A5-5C9F-
> 325132C012E1\ndfun.obj
> Creating library C:\DOCUME~1\DJB\LOCALS~1
> \Temp\mex_F231598E-534E-40A5-5C9F-325132C012E1\templib.x
> and object C:\DOCUME~1\DJB\LOCALS~1\Temp\mex_F231598E-534E-
> 40A5-5C9F-325132C012E1\templib.exp
> ndfun.obj : error LNK2019: unresolved external symbol
> dgecon referenced in function compute_lu
> ndfun.obj : error LNK2019: unresolved external symbol
> dgetrf referenced in function compute_lu
> ndfun.obj : error LNK2019: unresolved external symbol dgeev
> referenced in function mexFunction
> ndfun.obj : error LNK2019: unresolved external symbol
> dgetri referenced in function mexFunction
> ndfun.obj : error LNK2019: unresolved external symbol
> dgetrs referenced in function mexFunction
> ndfun.obj : error LNK2019: unresolved external symbol zgemm
> referenced in function mexFunction
> ndfun.obj : error LNK2019: unresolved external symbol dgemm
> referenced in function mexFunction
> ndfun.mexw64 : fatal error LNK1120: 7 unresolved externals

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