LAPACK Archives

[Lapack] Lapack on Windows <-> Name mangling

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 mangling
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 are
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 wikipedia:

"The GNU g77 compiler converts identifiers to lower case plus an underscore
("foo_"), except that identifiers already containing an underscore ("FOO_BAR")
has two underscores appended ("foo_bar__"), following a convention established
by f2c. Many other compilers, including SGI's IRIX compilers, gfortran, and
Intel's Fortran compiler, convert all identifiers to lower case plus an
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 how?

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

<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