且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

链接...链接:致命错误LNK1181:无法打开输入文件'libgsl.a'

更新时间:2021-09-21 23:36:25

最终找到了它

是的,我缺少一些图书馆. libgsl.a包含在GnuWin32 gsl软件包中.可以从 sourceforge 下载.显示的列表中有一个名为gsl的目录.我下载了gsl-1.8-lib.zip并将其解压缩到计算机中的C:\ GnuWin32.

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.

接下来,我将库包含到Visual Studio中.这是我从此网页.尽管这些是尝试失败的一部分(根据原始帖子),但对我来说效果很好

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. 在Visual Studio中,依次转到文件"->新建"->项目",然后转到"Visual C ++项目", 然后是"Win32",然后是"Win32控制台应用程序".输入名称,然后单击确定". 在下一个屏幕上,单击完成".

  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."

在解决方案资源管理器"中,右键单击您的项目名称,然后转到 到属性".

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

在配置属性"->链接器"->常规"->其他库目录"下, 键入"C:\ GnuWin32 \ lib"

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

在配置属性"->链接器"->输入"->其他依赖项"下,键入 在"libgslcblas.a libgsl.a"中

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

在配置属性"->"C/C ++"->常规"->附加包含目录"下, 输入"C:\ GnuWin32 \ include"

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

在配置属性"->"C/C ++"->代码生成"->运行时库"下,选择 多线程DLL"

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

现在工作正常.谢谢每一个尝试过的人

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