[英]C++ adding static libcurl, wont compile
Im using eclipse and mingw32. 我正在使用eclipse和mingw32。 My problem is when I add
-static
flag to linker options, i receive this error message: mingw32/bin/ld.exe: cannot find -llibcurl
我的问题是,当我将
-static
标志添加到链接器选项时,我收到此错误消息: mingw32/bin/ld.exe: cannot find -llibcurl
Without -static
flag, it combines fine and works. 如果没有
-static
标志,它将结合正常工作。 I compiled libcurl using mingw32. 我使用mingw32编译了libcurl。 Then I copied header files to mingw include folder, and files from libcurl lib folder to mingw lib folder.
然后我将头文件复制到mingw include文件夹,并将文件从libcurl lib文件夹复制到mingw lib文件夹。 I'm doing something wrong, but I dont know what.
我做错了事,但我不知道该怎么办。
-static means "Do not link against shared libraries." -static表示“不链接共享库”。 When you do not use this options linker links the binary with shared version (libcurl.so on linux/libcurl.dll on windows).
不使用此选项时,链接器将二进制文件与共享版本链接(在Windows上为linux / libcurl.dll,为libcurl.so)。 Probably you do not have static version of the libcurl on your development enviroment or you do not give the right path of the file (libcurl.lib).
可能您的开发环境上没有libcurl的静态版本,或者没有提供正确的文件路径(libcurl.lib)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.