Linking… LINK : fatal error LNK1181: cannot open input file 'libgsl.a'

≡放荡痞女 提交于 2019-12-04 15:34:06

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 for 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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!