using lapack via mingw in visual studio

Post here if you are having problem installing LAPACK on a Windows machine

using lapack via mingw in visual studio

Postby jacob11 » Tue Mar 13, 2012 10:08 am


I am trying to create either a dll or a lib from lapack to use in visual studio.

I created a dll with the following lines from a batch file.

gfortran -shared -o lapack.dll -Wl,-Map, -Wl,--output-def,lapack.def -Wl,--out-implib,lapack.a BLAS/SRC/*.o SRC/*.o INSTALL/slamch.o INSTALL/dlamch.o

I link against lapack.a in a VS2008 c project. The c code makes calls to dgesv_ and dnrm2_. The debug version works. The release version generates an unhandled memory access exception. Does anybody know anything about this?

I created a static library with these lines.

ar cr lapack.lib BLAS/SRC/*.o SRC/*.o INSTALL/slamch.o INSTALL/dlamch.o
ranlib lapack.lib

I added these linker dependencies.


I get unresolved externals. The first of which is

1>lapack.lib(iparmq.o) : error LNK2019: unresolved external symbol _logf referenced in function _iparmq_

I assume _logf is in a mingw library. Does anyone know which one?
Posts: 1
Joined: Tue Mar 13, 2012 10:00 am

Re: using lapack via mingw in visual studio

Postby admin » Mon Mar 19, 2012 5:51 pm

You should try to use the cmake build.
See instructions here:
Site Admin
Posts: 616
Joined: Wed Dec 08, 2004 7:07 pm

Return to Windows

Who is online

Users browsing this forum: No registered users and 1 guest