On Friday, 23 February 2018 at 12:13:11 UTC, Arredondo wrote:
Help using lubeck on Windows

I'd like to experiment with linear algebra in D, and it looks like lubeck is the way to do it right now. However, I'm having a hard time dealing with the CBLAS and LAPACK dependencies.

I downloaded the OpenBLAS binaries for Windows (libopenblas.dll), but I am cluless as to what to do with them. I can't find an example of how to link them/what commands to pass to dmd. Any help deeply appreciated.

It is a rather frustrating experience on Windows. I've banged my head against my desk a few times trying to get it working.

My suggestion is to get the Windows Subsystem for Linux set up. With Ubuntu, you can follow all of the Linux instructions and it is pretty easy.

For trying to get it to work on Windows, first look at lubeck's dub.sdl, it depends on mir-blas and mir-lapack. So before you think about getting lubeck to work, you'll need to get those to work. Both of those depend on calling C libraries, you might refer to


mir-blas depends on the D package cblas, which has headers for blas. It uses blas/cblas as libs, so you'll need to link in a blas library to get it to work.

mir-lapack depends on the D package lapack, which has headers for LAPACK. So again, I'm pretty sure you'll need to link in a lapack library to get it to work.

The lapack downloads usually contain a blas, though it may not be the most optimized one. The annoying thing is that when you go to the download links for things like lapack for Windows
the pre-built libraries require you to either have Visual Studio with Intel Compilers or MinGW and D's support with MinGW isn't all that great. So then what you'd need to do is use CMAKE to compile it with Visual Studio without Intel Compilers. This should work on DMD with -m32mscoff or -m64 and LDC. Also, make sure you link in the library correctly. Visual Studio's linker is different than DMD's when compiling 32bit code. I had given up and used WSL at this point rather than compile it myself with CMAKE. Less of a headache.

Reply via email to