Thread Subject: mex and GSL under windowsXP " .obj .text: undefined reference to '_gsl_matrix_alloc' "

Subject: mex and GSL under windowsXP " .obj .text: undefined reference to '_gsl_matrix_alloc' "

From: Peet Gronat

Date: 16 Nov, 2009 10:42:01

Message: 1 of 4

Dear Matlab users,

I am trying to compile my mex functions using GSL library on winXP 32bit. Under linux there is no problem, however, trying to compile my code under winXP following posts appear:

>> mex -LC:\GnuWin32\lib -IC:\GnuWin32\include cDICbicubic.c

Writing library for cDICbicubic.mexw32
c:\docume~1\petr\locals~1\temp\cdicbicubic.obj .text: undefined reference to '_gsl_matrix_alloc'
c:\docume~1\petr\locals~1\temp\cdicbicubic.obj .text: undefined reference to '_gsl_vector_alloc'
c:\docume~1\petr\locals~1\temp\cdicbicubic.obj .text: undefined reference to '_gsl_permutation_alloc'
c:\docume~1\petr\locals~1\temp\cdicbicubic.obj .text: undefined reference to '_gsl_matrix_set'
c:\docume~1\petr\locals~1\temp\cdicbicubic.obj .text: undefined reference to '_gsl_vector_set'
c:\docume~1\petr\locals~1\temp\cdicbicubic.obj .text: undefined reference to '_gsl_linalg_LU_decomp'
c:\docume~1\petr\locals~1\temp\cdicbicubic.obj .text: undefined reference to '_gsl_linalg_LU_solve'
c:\docume~1\petr\locals~1\temp\cdicbicubic.obj .text: undefined reference to '_gsl_vector_get'
c:\docume~1\petr\locals~1\temp\cdicbicubic.obj .text: undefined reference to '_gsl_matrix_free'
c:\docume~1\petr\locals~1\temp\cdicbicubic.obj .text: undefined reference to '_gsl_vector_free'
c:\docume~1\petr\locals~1\temp\cdicbicubic.obj .text: undefined reference to '_gsl_permutation_free'
 
  C:\PROGRAM FILES\MATLAB\R2006A\BIN\MEX.PL: Error: Link of 'cDICbicubic.mexw32' failed.

Seems there are problems with linking. Unfortunately, google did not help me. Can anyone give me some suggestions?

Sincerely PETR

Subject: mex and GSL under windowsXP " .obj .text: undefined reference to

From: Rune Allnor

Date: 16 Nov, 2009 12:39:21

Message: 2 of 4

On 16 Nov, 11:42, "Peet Gronat" <tob...@seznam.cz> wrote:
> Dear Matlab users,
>
> I am trying to compile my mex functions using GSL library on winXP 32bit. Under linux there is no problem, however, trying to compile my code under winXP following posts appear:
>
> >> mex -LC:\GnuWin32\lib -IC:\GnuWin32\include    cDICbicubic.c

> Seems there are problems with linking. Unfortunately, google did not help me. Can anyone give me some suggestions?

As I understand it, there are several ways of linking
libraries under windows, DLLs being just one. Since you
are using a GNU library, one item high on the list of
things to check is how well the GNU library integrates
with the DLL linking system.

I would be very surprised if GNU, being a nonprofit
organization, uses Microsoft's proprietary DLL conventions.
I would be equally surprised if whatever conventions GNU
uses can be conveniently integrated with the DLL system
matlab uses on wintel.

Rune

Subject: mex and GSL under windowsXP " .obj .text: undefined reference to

From: Peet Gronat

Date: 16 Nov, 2009 20:53:01

Message: 3 of 4

Rune Allnor <allnor@tele.ntnu.no> wrote in message <b28872b0-f54b-4c41-957a-9d771563e4ef@b15g2000yqd.googlegroups.com>...
> On 16 Nov, 11:42, "Peet Gronat" <tob...@seznam.cz> wrote:
> > Dear Matlab users,
> >
> > I am trying to compile my mex functions using GSL library on winXP 32bit. Under linux there is no problem, however, trying to compile my code under winXP following posts appear:
> >
> > >> mex -LC:\GnuWin32\lib -IC:\GnuWin32\include ? ?cDICbicubic.c
>
> > Seems there are problems with linking. Unfortunately, google did not help me. Can anyone give me some suggestions?
>
> As I understand it, there are several ways of linking
> libraries under windows, DLLs being just one. Since you
> are using a GNU library, one item high on the list of
> things to check is how well the GNU library integrates
> with the DLL linking system.
>
> I would be very surprised if GNU, being a nonprofit
> organization, uses Microsoft's proprietary DLL conventions.
> I would be equally surprised if whatever conventions GNU
> uses can be conveniently integrated with the DLL system
> matlab uses on wintel.
>
> Rune

Then I've another question. I need to use some linear algebra functions in my mex functions. The speed is very important for me. Could you suggest me some linear algebra libraries which I can use with ansi C? To be more specific, I need to solve linear system Ax=b A(6x6). Thank you!

Subject: mex and GSL under windowsXP " .obj .text: undefined reference to '_gsl_matrix_alloc' "

From: Ralph Schleicher

Date: 16 Nov, 2009 20:40:23

Message: 4 of 4

"Peet Gronat" <toboli@seznam.cz> writes:

> I am trying to compile my mex functions using GSL library on winXP
> 32bit. Under linux there is no problem, however, trying to compile my
> code under winXP following posts appear:
>
>>> mex -LC:\GnuWin32\lib -IC:\GnuWin32\include cDICbicubic.c
[...]
> Seems there are problems with linking. Unfortunately, google did not
> help me. Can anyone give me some suggestions?

Do you actually link against the GSL library? I can't see a '-lgsl'.
If yes, post the output of 'mex -v'.

--
Ralph Schleicher <http://ralph-schleicher.de>

Development * Consulting * Training
Mathematical Modeling and Simulation
Software Tools

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
mex vs gsl unde... P 16 Nov, 2009 05:44:04
rssFeed for this Thread

Contact us at files@mathworks.com