小编use*_*858的帖子

std :: sort和std :: stable_sort有什么区别?

我想知道一般std :: sort和std :: stable_sort与内存和硬件有什么区别?Stable_sort是否保留具有等效值的元素的相对顺序?

c++

9
推荐指数
4
解决办法
2万
查看次数

如何在ubuntu上编译curlpp?

下面是使用curl的简单test.c代码:

#include <stdio.h>
#include <curl/curl.h>
int main(){        
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

为了编译此代码,我使用:

gcc test1.c -lcurl -o test1
Run Code Online (Sandbox Code Playgroud)

对于test1.c,上面的编译是正确的。现在我想使用 C++ 库(curlpp)编写一些代码,然后编译它。

#include <iostream>
#include <curlpp/cURLpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>
int main(){
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

为了编译这段代码,我尝试了:

g++ test2.cpp -lcurl -o test2
Run Code Online (Sandbox Code Playgroud)

但我收到这个错误:

fatal error: curlpp/cURLpp.hpp no such file or directory
compilation terminated.
Run Code Online (Sandbox Code Playgroud)

这个公式不正确。问题是如何编译第二个代码 - test2.cpp?

c++ linux curl compilation

2
推荐指数
1
解决办法
6928
查看次数

标签 统计

c++ ×2

compilation ×1

curl ×1

linux ×1