views:

217

answers:

2

Hi,

I am using SIFT algorithm code by Rob Hess which uses OpenCV library, in Windows. And I am having visual studio 2008 as the IDE. When I run the program for image matching having Debug as the Solution Configuration in VS There is no problem, everything works fine. But when i change the Solution Configuration to Release it gives a linking error.

The error is "Linking... LINK : fatal error LNK1181: cannot open input file 'libgsl.a' "

Can someone explain me the reason and tell me how to resolve this.

Thank you

A: 

maybe you have forgotten to set up your lib paths in the Release configuration.

thbusch
It has something to do with Gnuwin32 library and it is not installed in my computer. Any idea where I can find the right one. Googling lead me to this.(http://gnuwin32.sourceforge.net/packages.html#Setup) But I dont know which one I should download. Thank you
Niroshan
A: 

Finally found it

Yes I was missing some libraries. libgsl.a comes in GnuWin32 gsl package. This can be downloaded from sourceforge. There is a directory named gsl in the list displayed. I downloaded gsl-1.8-lib.zip and extracted it to C:\GnuWin32 in my computer.

Next I included the library to Visual Studio. Here are the steps which I found from this webpage. Although these are part of an unsuccessful try (according to the orginal post) this worked very well with me

  1. Within VisualStudio, go to File->New->Project, then "Visual C++ Projects," then "Win32," then "Win32 Console Application." Enter a name and click "OK." On the next screen click "Finish."

  2. In the "Solution Explorer," right click on the name of your project and go to "Properties."

  3. Under Configuration Properties->Linker->General->Additional Library Directories, type in "C:\GnuWin32\lib"

  4. Under Configuration Properties->Linker->Input->Additional Dependencies, type in "libgslcblas.a libgsl.a"

  5. Under Configuration Properties->C/C++->General->Additional Include Directories, type in "C:\GnuWin32\include"

  6. Under Configuration Properties->C/C++->Code Generation->Runtime Library,select "Multi-threaded DLL"

It works fine now. Thank you for every one who tried

Niroshan