memo for compiling levmar 2.6 on windows with visual studio 2010.
we need to modify the code a bit for compilation!!!
- .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.
- 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
- Uncomment the line 31 of ”#define LM_BLAS_PREFIX f2c_”.
- Comment out the line 37 of “#define LM_BLAS_SUFFIX _ ”
- Uncomment the line 35 of “#define LM_BLAS_SUFFIX”.
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.