为什么我的应用程序要求输入libcurl.dll和libssh2.dll? [英] Why do my app asks for libcurl.dll and libssh2.dll?
问题描述
你好,我希望我能在这里得到答案,因为自昨天以来这个问题一直困扰着我.我使用curl创建了一个小代码,下载了该库并将其放在mingw"lib"目录(libcurl.a和libcurldll.a)中,然后使用此选项
Hello, i hope I get answers here, since this problem been bugging me since yesterday. I created a small code, using curl, I downloaded the library and put it in the mingw "lib" directory (libcurl.a and libcurldll.a), then I compiled my code with this option
gcc MyCode.c -DCURL_STATICLIB -lcurldll
编译了我的代码(我使用了-lcurldll,因为我在-lcurl上出错)所以现在我已经编译了应用程序.首先,它要求提供libcurl.dll(我找到了它并将其提供给应用程序),然后再次要求了libshh2.dll(我至今尚未找到它,并且在编译时遇到了麻烦).
当我看一些教程时,似乎并不需要这些dll,发生什么了?
我尝试过的事情:
我尝试从源代码编译libshh2,但是从昨天开始就没有运气了.
(I used -lcurldll because I have errors on -lcurl) So now I have the application compiled. First it asked for libcurl.dll (I found it and feed it to the app) then it asked again for libshh2.dll (which I havn''t found till now and having trouble compiling it).
When I look at some tutorial, these dll doesn''t seem to be needed, what happens to mine?
What I have tried:
I tried compiling libshh2 from the source but no luck since yesterday
推荐答案
您的-DCURL_STATICLIB
声明意味着您将使用静态库,但随后尝试链接到dll.如果使用该声明,则需要指定-lcurl
而不是-lcurldll
.
Your declaration of-DCURL_STATICLIB
means you will use the static library, but you then try to link to the dll. If you use that declaration then you need to specify-lcurl
not-lcurldll
.
这篇关于为什么我的应用程序要求输入libcurl.dll和libssh2.dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!