Posted by: sirivy | September 10, 2009

compile Levmar-2.4 without LAPACK on windows

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 ^_^


Responses

  1. good! thanks!

  2. Good blog you have got here.. It’s difficult to find excellent writing like yours nowadays. I seriously appreciate people like you! Take care!!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: