LAPACK Archives

[Lapack] Lapack on Windows <-> Name mangling

For Windows, we are providing integration with Visual Studio, nmake  
with Fortran or PGI compilers. There is no precompiled libs with g77.
We did not look into g77 with MinGW, but I guess if you take the  
native Linux package that should work without too much problems if you  
stay with Fortran all the way with LAPACK. (I know there is no problem  
with Cygwin)
I guess you have a code in C, no? Usually this is when the mangling  
problems happen.
Maybe what you can do is use the CLAPACK package and go with C all the  
way. (
Also if you are stuck, you can try to post on the LAPACK forum, you  
may find a user in the same situation. ( 
Hope it helps

On Jul 23, 2009, at 6:24 AM, Wilm Schumacher wrote:

Dear Lapack-Team,

ich have a suggestion and a question regarding "LAPACK for Windows".  
I have a
really hard time to link the precompiled libs. I think it's a name  
problem. I use WindowsXP and g77.exe from MinGW. It is not possible  
to link
BLAS.lib because there is the "undefinded reference to <every possible
subroutine>". I'm very new to the topic of name mangling but I think  
that's the
problem. As I did a "nm" on the libraries I saw that the subroutines  
decorated UPPER case and with a LEADING underscore and no underscore  
at the
end. This was very ... confusing to me because I read in the  

"The GNU g77 compiler converts identifiers to lower case plus an  
("foo_"), except that identifiers already containing an underscore  
has two underscores appended ("foo_bar__"), following a convention  
by f2c. Many other compilers, including SGI's IRIX compilers,  
gfortran, and
Intel's Fortran compiler, convert all identifiers to lower case plus  
underscore ("foo_" and "foo_bar_")"

but found in the output of nm:

00000000 i .drectve
00000000 t .text
00000001 a @feat.00
00000000 T _DAXPY
        U __fltused

as an example. As I can see, your name mangling is in another way.  
Did you use
the PGI compiler? Did you change the name mangling? If so: Why and  

It would by nice and necessary that you explain your name mangling  
for your

Furthermore it would be very nice if you explain how to use your  
build regarding
different compilers/linkers.

Greetings and Thanks for the good work

Wilm Schumacher

ps: If you did the suggested work and I just didn't find it I'm  
sorry and would
be very happy about a link.

This mail was sent through
Lapack mailing list

Julie Langou; Research Associate in Computer Science
Innovative Computing Laboratory;
University of Tennessee from Denver, Colorado ;-)

-------------- next part --------------
An HTML attachment was scrubbed...

<Prev in Thread] Current Thread [Next in Thread>

For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or