qt c ++错误:curl / curl.h:没有这样的文件或目录

时间:2014-05-28 13:36:47

标签: c++ qt curl libcurl

我下载了libcURL源代码并将头文件和源文件导入我的.pro文件中,它似乎找到了除主文件夹之外的所有库。

死了:

#include <curl/curl.h>

.pro文件包含: (这是更新版本)....................

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = RESTtest
TEMPLATE = app


SOURCES += main.cpp\
        mainwindow.cpp \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlMulti.cpp \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlHeader.cpp \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlVersion.cpp \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlEasy.cpp \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlShare.cpp \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlMessage.cpp \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlHttpPost.cpp \


HEADERS  += mainwindow.h \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlEasy.h \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlInterface.h \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlMulti.h \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlPair.h \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlVersion.h \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlHttpPost.h \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlHeader.h \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlShare.h \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlMessage.h \
    ../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlError.h \


FORMS    += mainwindow.ui
win32:LIBS += -L"../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64" -lcurl
INCLUDEPATH += "../../../../../Users/Brad2/Documents/GitHub/curlcpp/include"
INCLUDEPATH += "../../../../../Users/Brad2/Documents/GitHub/curlcpp/src"
INCLUDEPATH += "../../../../../Users/Brad2/Documents/GitHub/curl/include"
INCLUDEPATH += "../../../../../Users/Brad2/Documents/GitHub/curl/include/curl"

OTHER_FILES += \
    ../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/curl.exe \
    ../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/libeay32.dll \
    ../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/libcurl.dll \
    ../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/ssleay32.dll \
    ../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/mk-ca-bundle.vbs

1 个答案:

答案 0 :(得分:0)

安装此:

apt-get install libcurl4-openssl-dev 

apt-get install libcurl4-gnutls-dev