Search code examples
c++windowsvisual-studiolapackmingw-w64

Compile LAPACK for windows using MinGW-w64


What I want to do is use LAPACK on windows 64 bit. The steps to build it using mingw 64bit are noted here: http://icl.cs.utk.edu/lapack-for-windows/lapack/index.html#build

It mentions that libgcc_s_dw2-1.dll is a required dll. But if I install mingw64 bit, then this dll is not installed. How do I go around this. Anyone else used mingw 64bit to compile and use LAPACK?


Solution

  • It mentions that libgcc_s_dw2-1.dll

    this is actually just wrong. libgcc_s_XXX-1.dll is runtime support library which deals, in particular, with exceptions.

    XXX suffix encodes what kind of exception handler is supported. For x86 (32bit) you could select between DWARF and sjlj exceptions. For x64 you could select between SEH and sjlj exceptions. dw2 clearly indicates the library with DWARF2 support, which implies 32bit compiler. It won't work with x64 libraries you want to build.

    Either ignore the requirement and try to build anyway, or ask developers what exactly they want it to be

    UPDATE

    I would try first to download prebuilt DLLs and check actual DLL dependency.

    > dumpbin.exe /DEPENDENTS qqq.dll