I am Charmie

メモとログ

levmar 2.6 with Visual Studio 2010

memo for compiling levmar 2.6 on windows with visual studio 2010.

we need to modify the code a bit for compilation!!!

  1. .lib files CmakeLists.txt of levmar 2.6 assumes that you put all lapack related .lib files into one directory. In Cmake GUI, it’s called LAPACKBLAS_DIR that is pre-defined as ‘/usr/lib’. If you compile clapack by yourself, the lib files are generated in different directories not in a directory. To use original CmakeLists.txt, you should put the .lib files into one directory and set LAPACKBLAS_DIR on Cmake GUI. Then, link problem should be solved.
  2. setting related to BLAS See the FAQ. We have to modify misc.h according to BLAS. The original misc.h assumes that you have a F77 BLAS. If your BLAS is either f2c'ed BLAS or CBLAS, you should modify a few lines in misc.h. If you compiled CLAPACK by yourself, your BLAS is f2d'ed one. Then, what you should do is
    1. Uncomment the line 31 of ”#define LM_BLAS_PREFIX f2c_”.
    2. Comment out the line 37 of “#define LM_BLAS_SUFFIX _
    3. Uncomment the line 35 of “#define LM_BLAS_SUFFIX”.
  3. HAVE_LAPACK check the HAVE_LAPACK option in cmake, and then compile it.

You can see how levmar works with an example program provided by the author.