Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Creator and cURL - curl.h file not found
Forum Updated to NodeBB v4.3 + New Features

Qt Creator and cURL - curl.h file not found

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cppStudent012
    wrote on 14 Sept 2019, 14:37 last edited by
    #1

    Hi!

    In this new project I am starting to make I need use the curl library.

    In order to have Qt Creator build and compile with this library I followed this guide:

    http://www.cplusplus.com/forum/general/89488/

    or tried this other method:

    https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html

    by adding curl library as external static library (curl.a file).

    Unluckly none of the 2 methods is working and at the moment I am stuck.

    Is there anyone who could please help me to solve this problem or who had this same problem at their time and could help me out?

    Thank you in advance!

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 14 Sept 2019, 14:46 last edited by
      #2

      When you want to use a library you have to add the include path to INCLUDEPATH and add the library you want to link to to LIBS

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      3
      • C Offline
        C Offline
        cppStudent012
        wrote on 14 Sept 2019, 15:21 last edited by
        #3

        Thank you for the answer @Christian-Ehrlicher!

        Yes I did what you explained, here it is:

        .pro file

        0_1568474330502_curl_pro.png

        (includer in the INCLUDEPATH is not a typo, i changed the name of the folder otherwise "include" would have highlighted as keyword)

        .cpp file

        0_1568474362601_curl_cpp.png

        but as you can see the error is still there

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 14 Sept 2019, 15:30 last edited by
          #4

          Since there are spaces in the path you will have to quote them with " or better - move them to a good location without spaces.
          And putting a library under 'Start Menu' is for sure not very sensible...

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          5
          • C Offline
            C Offline
            cppStudent012
            wrote on 14 Sept 2019, 15:44 last edited by
            #5

            Oh snap, you are right!!
            I was trying to link it with the wrong path..

            Thank you very much @Christian-Ehrlicher!!

            1 Reply Last reply
            0

            1/5

            14 Sept 2019, 14:37

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved