我在Win32 C++应用程序中使用libcurl.
我已将curllib.vcproj项目添加到我的解决方案中,并将其他项目设置为依赖于它.
如何在启用SSL支持的情况下构建它?
我有一个 C++ 程序 test.cpp,我想将两个 .lib 文件链接到它(fhlib.lib 和 gc_lib.lib)。我的 .lib 文件与我的 .cpp 程序位于同一文件夹中。我在 Windows 7 上。
到目前为止我尝试过的内容如下:
g++ -o main main.cpp -L/Users\Documents\Visual Studio 2015\Projects\My Project -lfhlib
Run Code Online (Sandbox Code Playgroud)
但我得到一个
No such file or directory error.
Run Code Online (Sandbox Code Playgroud)
我确定路径是正确的,因为我是从 Properties->Location 复制的。但我确实删除了“C:\”,因为它没有编译。
编辑:我发现这个http://www.mingw.org/wiki/Specify_the_libraries_for_the_linker_to_use。
所以我尝试使用
"-I" instead of "-l"
Run Code Online (Sandbox Code Playgroud)
但仍然不起作用。我得到:
undefined reference to 'fh_set'...
Run Code Online (Sandbox Code Playgroud)