Thread Subject: Lcc and libmwlapack: underscore problem

Subject: Lcc and libmwlapack: underscore problem

From: David Hanau

Date: 12 Aug, 2009 18:30:20

Message: 1 of 3

Hi,

I use Lcc to compile C functions in Matlab V6.1.0

The standart lib libmwlapack.dll in Matlab includes functions spelled without underscores around their name, for exemple dsyev, while lcc generates a call to _dsyev. I have the following error:

sparsesvd.obj .text: undefined reference to '_dsyev'
for
dsyev(jobz,uplo,&n,Vmat,&n,Dvec,workvec,&lwork,&inflapack); in sparsesvd.c
and
void dsyev(char *jobz,char *uplo,int *n,double *a,int *lda,double *w,double *work,int *lwork,int *info); in sparsesvd.h

Am I wrong somewhere?
Any idea to help me?

Thanks a lot!

David

Subject: Lcc and libmwlapack: underscore problem

From: James Tursa

Date: 12 Aug, 2009 19:18:05

Message: 2 of 3

"David Hanau" <hanaud@gmail.com.REMTHIS> wrote in message <h5v1ns$jde$1@fred.mathworks.com>...
> Hi,
>
> I use Lcc to compile C functions in Matlab V6.1.0
>
> The standart lib libmwlapack.dll in Matlab includes functions spelled without underscores around their name, for exemple dsyev, while lcc generates a call to _dsyev. I have the following error:
>
> sparsesvd.obj .text: undefined reference to '_dsyev'
> for
> dsyev(jobz,uplo,&n,Vmat,&n,Dvec,workvec,&lwork,&inflapack); in sparsesvd.c
> and
> void dsyev(char *jobz,char *uplo,int *n,double *a,int *lda,double *w,double *work,int *lwork,int *info); in sparsesvd.h
>

In the MATLAB versions I have available, there are two separate directories for lcc and microsoft, each with their own versions of libmwlapack.lib. Are you, by chance, using the libmwlapack from the microsoft directory instead of the lcc directory?

James Tursa

Subject: Lcc and libmwlapack: underscore problem

From: David Hanau

Date: 17 Aug, 2009 12:28:03

Message: 3 of 3

"James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <h5v4hd$kfb$1@fred.mathworks.com>...
> "David Hanau" <hanaud@gmail.com.REMTHIS> wrote in message <h5v1ns$jde$1@fred.mathworks.com>...
> > Hi,
> >
> > I use Lcc to compile C functions in Matlab V6.1.0
> >
> > The standart lib libmwlapack.dll in Matlab includes functions spelled without underscores around their name, for exemple dsyev, while lcc generates a call to _dsyev. I have the following error:
> >
> > sparsesvd.obj .text: undefined reference to '_dsyev'
> > for
> > dsyev(jobz,uplo,&n,Vmat,&n,Dvec,workvec,&lwork,&inflapack); in sparsesvd.c
> > and
> > void dsyev(char *jobz,char *uplo,int *n,double *a,int *lda,double *w,double *work,int *lwork,int *info); in sparsesvd.h
> >
>
> In the MATLAB versions I have available, there are two separate directories for lcc and microsoft, each with their own versions of libmwlapack.lib. Are you, by chance, using the libmwlapack from the microsoft directory instead of the lcc directory?
>
> James Tursa

I did not have any corresponding lib in the lcc directory. I have used the "import external lib" tool in lcc-Win32 to generate new ones from the DLL.
I copied them in my path and I worked fine.

Thank you for your help!

David

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
lcc Sprinceana 12 Aug, 2009 15:37:00
compile c funct... Sprinceana 12 Aug, 2009 15:37:00
rssFeed for this Thread

Contact us at files@mathworks.com