LAPACK Archives

[Lapack] lapacke static libraries for Windows Visual Studio

Dear Lapack,

First I would like to say how much I appreciate the Lapack for Windows project 
and website! It's a great source of information and has saved me a lot of 
trouble in getting lapack(e) to work properly in Windows and Visual Studio.

So I've managed to compile the dynamic libraries using cmake, following the 
instructions on the Lapack for Windows website, and I managed to replace the 
reference blas with my own optimised ATLAS/blas. I can now compile simple C++ 
test programs calling lapack and blas routines using Visual Studio. So far so 
good.

However, the software development team at my company does not allow dynamic 
libraries for third party software (for arcane and obscure reasons that I 
presume are only clear to them). So now I have to try and build the static 
libraries for use in Visual Studio. Using cmake I leave the 'BUILD_SHARED_LIBS' 
and 'CMAKE_GNUtoMS' checkboxes unchecked. After compilation I copy the libxxx.a 
files to libxxx.lib and also copy libgfortran.a to libgfortran.lib. Adding all 
those libfiles as dependencies in Visual Studio and building then gives:

1>------ Build started: Project: lapack_test, Configuration: Release x64 ------
1>  lapack_test.cpp
1>liblapack.lib(ilaenv.f.obj) : error LNK2001: unresolved external symbol 
_gfortran_compare_string
1>liblapack.lib(xerbla.f.obj) : error LNK2001: unresolved external symbol 
_gfortran_st_write
1>liblapack.lib(xerbla.f.obj) : error LNK2001: unresolved external symbol 
_gfortran_string_len_trim
1>liblapack.lib(xerbla.f.obj) : error LNK2001: unresolved external symbol 
_gfortran_transfer_character_write
1>liblapack.lib(xerbla.f.obj) : error LNK2001: unresolved external symbol 
_gfortran_transfer_integer_write
1>liblapack.lib(xerbla.f.obj) : error LNK2001: unresolved external symbol 
_gfortran_st_write_done
1>liblapack.lib(xerbla.f.obj) : error LNK2001: unresolved external symbol 
_gfortran_stop_string
1>liblapack.lib(dormqr.f.obj) : error LNK2001: unresolved external symbol 
_gfortran_concat_string
1>liblapack.lib(dormlq.f.obj) : error LNK2001: unresolved external symbol 
_gfortran_concat_string
1>liblapack.lib(iparmq.f.obj) : error LNK2001: unresolved external symbol 
lroundf
1>D:\_Development\Testing\lapack_test\x64\Release\lapack_test.exe : fatal error 
LNK1120: 9 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


(a complete screen dump, including the simple test program itself is attached 
as image).

However, if I compile this simple program in cygwin with

$ g++ -o lapack_test.exe lapack_test.cpp  -llapacke -llapack -lblas -lgfortran

everything works fine and I can execute the test program and it gives the 
correct output.

I've tried

$ nm libgfortran.a | grep -i gfortran_st_write
00000000 t .text$__gfortran_st_write
00000000 t .text$__gfortran_st_write_done
00000000 T __gfortran_st_write
00000000 T __gfortran_st_write_done

to shed some light on this problem, but this does not really enlighten me (I 
notice two leading underscores in the output of nm, instead of just one in the 
Visual Studio output, but I'm not sure if this is the problem).

I've searched the forums for help, but although linking problems seem to abound 
in Lapack for Windows, I could not find any help on this specific problem. Do 
you guys have any idea what is going here? Am I missing some additional 
libraries that I need to link to? Some setting in Visual Studio that I've 
missed?

Any help would be greatly appreciated!

Thank you very much and congrats on the good work,

Joris Van Deun
Research Engineer
Materialise N.V.
Leuven, Belgium

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.eecs.utk.edu/mailman/private/lapack/attachments/20121002/f1239654/attachment-0001.html
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture.PNG
Type: image/png
Size: 175304 bytes
Desc: Capture.PNG
Url : 
http://lists.eecs.utk.edu/mailman/private/lapack/attachments/20121002/f1239654/Capture-0001.png
 

<Prev in Thread] Current Thread [Next in Thread>
  • [Lapack] lapacke static libraries for Windows Visual Studio, Joris Van Deun <=


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