0
votes

I downloaded the libcURL source code and imported the headers and source into my .pro file and it seems to find all the libraries except for the main one.

dies on:

#include <curl/curl.h>

.pro file contains: (this is the updated version)....................

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
What is the full path to the curl/curl.h file?vahancho
And why are you importing the source code directly, instead of building the library?Adri C.S.
git clone github.com/JosephP91/curlcpp is the copy i used and I don't see curl.h. C:\Users\Brad2\Documents\GitHub\curlcpp is my path and I am static linking source so that it is fully built into the final build.brad
Check this : stackoverflow.com/questions/22834233/… This could come from your OS version.Evans Belloeil
The link you provided states An object-oriented C++ **wrapper** for cURL tool and in the CMakeLists.txt file cUrl appears as a dependency. Most likely you first have to install cUrl and then tell CMake where to find it.Adri C.S.

1 Answers

0
votes

Install this:

apt-get install libcurl4-openssl-dev 

apt-get install libcurl4-gnutls-dev