Installing DaoSTORM for windows

Into the rabbit hole!

DaoSTORM requires 64 bit C-libraries, which requires a 64 bit compiler, which to build first requires an installation of a c-32 bit compiler.  Also requires Fortran libraries in Lapack which requires the program CMAKE to install which itself requires a 32-bit C compiler to install.

(1) Install MinGW.  Directions for install here.  Basically you can download a GUI installer and it installs like a regular program.   DO install all the options (c++, MinSYS)

(2) Run MinGW (you basically get a terminal).  Then you can run updates (details described here):

mingw-get update
mingw-get install mingw-get
mingw-get install gcc

(3) Download CMAKE windows executable file (exe).  This is another nice GUI installer that installs like a real program.

(4) Build Instructions to create LAPACK 3.4.1 dll for Windows with MinGW

(This is copied from the above website.  That site has like 50 ways to install LAPACK for windows in what I found to be a rather confusing order, and the first 3 I tried didn’t work.  However these step by step directions do):  

Requirements: MinGW, CMAKE 2.8.8, VS IDEs

  1. Download the lapack.tgz from the netlib website and unzip.
  2. Download CMAKE and install it on your machine.
  3. Download MinGW 32 bits or MinGW-w64 and install it on your machine.
  4. Put the GNU runtime directory in your PATH, for me I added Add C:\MinGW\bin in my PATH (right click on your computer icon, go to properties, advanced system settings, Environment Variables, look for the PATH variable and put ‘C:\MinGW\bin;’ in front of its current value)
  5. Open CMAKE
    • Point to your lapack-3.4.1 folder as the source code folder
    • Point to a new folder where you want the build to be (not the same is better)
    • Click configure, check the install path if you want to have the libraries and includes in a particular location.
    • Choose MinGW Makefiles.
    • Click “Specify native compilers” and indicate the path to the Mingw compilers. On my machine, it is “C:/MinGW/bin/gfortran.exe”
    • Set the ‘BUILD_SHARED_LIBS’ option to ON.
    • Click again configure until everything becomes white
    • Click generate, that will create the mingw build.
    • Close CMAKE
  6. Open a cmd prompt (Click Run.. then enter cmd)
  7. Go to your build folder using the cd command
  8. Type C:/MinGW/bin/mingw32-make.exe
  9. Type C:/MinGW/bin/mingw32-make.exe test if you want to run LAPACK testings to make sure everything is ok
  10. Your libs are in the lib folder, the dlls are in the bin folder. The resulting build will provide both GNU-format and MS-format import libraries for the DLLs.
  11. Now you should be able to create a C application built with MSVC and linked directly to the MinGW-built LAPACK DLLs
  12. NOTE: Your C application built with Microsoft Visual Studio and linked to the MinGW-built lapack DLLs will run but requires the GNU runtime DLLs ( both libgfortran-3.dll and libgcc_s_dw2-1.dll are needed.) from MinGW to be available. As you have the GNU runtime directory in your PATH, you should be good to go.

Trying to Download and Build MinGW 64: http://www.reactos.org/wiki/Building_MINGW-w64 (If this works, could have probably done this instead of starting with MinGW).

Let’s use MinGW to try to install mingw-64 [this fails], executing the file “configure” from MinGW gives error ‘Please check if the mingw-w64 header set and the build/host option are set properly.

This entry was posted in General STORM and tagged , . Bookmark the permalink.