There are few steps to compile levmar-2.4 source code.
1. You can download source code from here. (look for “version 2.4″ and then click to download)
2. Extract file to your desire directory.
3. Next, you have to modify three lines(line 22 , 23 and 32) in Makefile.vc
- Comment this line: (line 22)
LAPACKLIBS_PATH=C:\src\lib # WHEN USING LAPACK, CHANGE THIS TO WHERE YOUR COMPILED LIBS ARE!
Like this:
#LAPACKLIBS_PATH=C:\src\lib # WHEN USING LAPACK, CHANGE THIS TO WHERE YOUR COMPILED LIBS ARE! - Modify this line a bit:(line 23)
LDFLAGS=/link /subsystem:console /opt:ref /libpath:$(LAPACKLIBS_PATH) /libpath:.
to be like this:
LDFLAGS=/link /subsystem:console /opt:ref /libpath:. - Comment out this line:(line 32)
LAPACKLIBS=clapack.lib blas.lib libF77.lib libI77.lib
like this:
#LAPACKLIBS=clapack.lib blas.lib libF77.lib libI77.lib
4. Next, you have to follow their readme file by comment out one line in file lm.h
- Comment out this line
#define HAVE_LAPACK /* use LAPACK */
to be like this
//#define HAVE_LAPACK /* use LAPACK */
5. Finally, you can try to compile in command prompt.
- Go to your levmar-2.4 directory then type
nmake /f Makefile.vc
Finish! now you can test with your lmdemo.exe
Good Luck ^_^
Advertisement