Salve,
sto provando a compilare le librerie di algebra lineare Lapack 3.8.0 con gcc e gfortran in modo da poterla usare in un progetto Visual C++.
Ho seguito le istruzioni su questo sito:
http://icl.cs.utk.edu/lapack-for-windows/lapack/index.html
(
Build Instructions to create LAPACK and LAPACKE 3.5.0 dlls for Windows with MinGW)
Ma quando lancio il comando mingw32-make.exe, si blocca al 44% con questo output di errore:
[ 44%] Linking Fortran shared library ..\bin\liblapack.dll
C:/GNUPATH/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libgfortran.a(string_intrinsics.o):(.text$_gfortran_concat_string+0x0): multiple definition of `_gfortran_concat_string'
../lib/libblas.dll.a(d000008.o):(.text+0x0): first defined here
C:/GNUPATH/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libgfortran.a(string_intrinsics.o):(.text$_gfortran_string_len_trim+0x0): multiple definition of `_gfortran_string_len_trim'
../lib/libblas.dll.a(d000038.o):(.text+0x0): first defined here
C:/GNUPATH/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libgfortran.a(transfer.o):(.text$_gfortran_transfer_integer_write+0x0): multiple definition of `_gfortran_transfer_integer_write'
../lib/libblas.dll.a(d000058.o):(.text+0x0): first defined here
C:/GNUPATH/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libgfortran.a(transfer.o):(.text$_gfortran_transfer_character_write+0x0): multiple definition of `_gfortran_transfer_character_write'
../lib/libblas.dll.a(d000053.o):(.text+0x0): first defined here
C:/GNUPATH/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libgfortran.a(transfer.o):(.text$_gfortran_st_write+0x0): multiple definition of `_gfortran_st_write'
../lib/libblas.dll.a(d000032.o):(.text+0x0): first defined here
C:/GNUPATH/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libgfortran.a(transfer.o):(.text$_gfortran_st_write_done+0x0): multiple definition of `_gfortran_st_write_done'
../lib/libblas.dll.a(d000033.o):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [SRC\CMakeFiles\lapack.dir\build.make:27686: bin/liblapack.dll] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:163: SRC/CMakeFiles/lapack.dir/all] Error 2
mingw32-make: *** [Makefile:162: all] Error 2
Il problema si presenta con MinGW a 32 e 64 bit.
Ho provato a disabilitare BUILD_SHARED_LIBS dalla gui di CMake e così funziona, ma non produce le dll, solo le lib. Qualcun altro ha provato a farlo? Avete qualche dritta? Vi ringrazio per l'aiuto.