- Get Lapack up and running in support of 64-bit C++ software I'm writing in Visual Studio 2013.
- I'm following the general instructions at http://icl.cs.utk.edu/lapack-for-windows/lapack
- Previously, I tried to use the pre-built libraries there - but that failed (see my sister post at viewtopic.php?f=12&t=4873&p=11707#p11707)
- So, based on comments in a previous post at viewtopic.php?f=12&t=4260, I'm trying to use CMake to generate the Lapack libraries on my system.
- But CMake is complaining about the Fortran compiler I'm specifying.
Steps I'm taking
- I download the lapack build files at http://netlib.org/lapack/lapack.tgz and placed the files at C:\Program Files\Common Files\MSVC\LAPACK\lapack-3.6.0
- I created a build folder at C:\Program Files\Common Files\MSVC\LAPACK\build
- I already have CMake 3.4.1 on my computer
- To get MinGW-w64, I followed the link to http://mingw-w64.sourceforge.net/ which auto-downloads the mingw-w64-install.exe installer program - which forces you to select 'settings'. I chose the following: (Version 4.9.3, Architecture: x86_64, Threads: win32, Exception: seh, Build Revision: 1)
- This installed mingw to the default location on my computer
- I added the bin folder w/in mingw to my path
- Started CMake, specified the Lapack folders, upon hitting configure I selected (Generator: Visual Studio 12 2013 Win64, Specify native compiler, and for the 3 compilers I chose: For the c & c++ compiler the x86_64-w64-mingw32-gcc.exe file in the bin folder of mingw and for the Fortran compiler the x86_64-w64-mingw32-gfortran.exe file also in the bin folder of mingw)
- Upon hitting 'Finish' I get a long list of errors, the initial ones being:
>
- Code: Select all
The Fortran compiler identification is unknown
Check for working Fortran compiler using: Visual Studio 12 2013 Win64
Check for working Fortran compiler using: Visual Studio 12 2013 Win64 -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeTestFortranCompiler.cmake:54 (message):
The Fortran compiler "C:/Program
Files/mingw-w64/x86_64-4.9.3-win32-seh-rt_v4-rev1/mingw64/bin/x86_64-w64-mingw32-gfortran.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Program Files/Common Files/MSVC/LAPACK/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/Microsoft Visual Studio
12.0/Common7/IDE/devenv.com" "CMAKE_TRY_COMPILE.sln" "/build" "Debug"
"/project" "cmTC_5ad31"
...
I confirmed that x86_64-w64-mingw32-gfortran.exe is visible on the Path with the 'where' command at the Dos prompt. Am I specifying the wrong compilers? Or am I making a different mistake?
PS I apologize for the brevity of some my descriptions above - my posts keep getting flagged as spam and denied if I'm too verbose (or perhaps if I specify too many paths!) - so I abridged some of my descriptions.