[英]How can I build curlpp on Windows for gcc?
I've downloaded the package from here: https://github.com/jpbarrette/curlpp 我已经从这里下载了软件包: https : //github.com/jpbarrette/curlpp
When I drag CMakelists.txt onto cmake.exe it does build something that looks like a Microsoft Visual Studio project. 当我将CMakelists.txt拖到cmake.exe上时,它确实生成了类似于Microsoft Visual Studio项目的内容。 I want to build static library that I could use in Codeblocks with GCC instead. 我想构建可以在Codeblocks中使用GCC的静态库。 I've not idea how to do it, I don't know where the options are or how to set appropriate flags. 我不知道该怎么做,不知道选项在哪里或如何设置适当的标志。
I've also followed this post: https://stackoverflow.com/a/27609214/7310666c which is about cURL - it build correctly, but when I linked it to my project it gave me undefined reference error. 我也关注了这篇文章: https ://stackoverflow.com/a/27609214/7310666c关于cURL-它可以正确构建,但是当我将其链接到我的项目时,它给了我未定义的参考错误。
Could anyone give me a hand here? 有人可以帮我吗? My desktop is already littered by all the files I downloaded while trying. 我的桌面已经被我在尝试时下载的所有文件所困扰。
CMake [..] is responsible for writing the input files for a native build system. CMake [..]负责为本机构建系统编写输入文件。
The modules responsible of creating files for a specific build system are called "Generators". 负责为特定构建系统创建文件的模块称为“生成器”。 For a full list of those generators, please have a look at this . 有关这些生成器的完整列表,请查看此 。
In your case, by default it selects Visual Studio, even though "Code Blocks" should be available. 在您的情况下,即使“代码块”应该可用,默认情况下也会选择Visual Studio。
So, here's an example of how you could obtain the required files: 因此,这是一个如何获取所需文件的示例:
cd /path/to/curlpp/
mkdir build
cd build
cmake -G "CodeBlocks - NMake Makefiles" ..
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.