链接...链接:致命错误LNK1181:无法打开输入文件'libgsl.a' [英] Linking... LINK : fatal error LNK1181: cannot open input file 'libgsl.a'

查看:339
本文介绍了链接...链接:致命错误LNK1181:无法打开输入文件'libgsl.a'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Rob Hess 使用OpenCV的SIFT算法代码Windows中的库.我将Visual Studio 2008作为IDE.当我运行具有Debug作为VS中的解决方案配置的图像匹配程序时,没有问题,一切正常.但是,当我将解决方案配置更改为发布"时,会出现链接错误.

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.

错误是:

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

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

有人可以向我解释原因,并告诉我如何解决此问题.

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

谢谢

推荐答案

最终找到了它

是的,我缺少一些图书馆. 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

这篇关于链接...链接:致命错误LNK1181:无法打开输入文件'libgsl.a'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆