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. Include code from GitHub in Qt project

Include code from GitHub in Qt project

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 4 Posters 684 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.
  • Q Offline
    Q Offline
    Qtpp
    wrote on last edited by Qtpp
    #1

    Hi there,

    I'm new to Qt and relatively new to C++.
    How can I add libraries/code I pulled from GitHub (or somewhere else) to my QMake project?
    There are no .lib files, so the Wizard in QtCreator to add dynamic libraries doesn't work.
    I already added the INCLUDEPATH to my .pro file and I managed to include the headers, I need... and now?!
    I still get undefinded reference to ..... messages when using functions from there.
    Do I need to compile the whole code from GitHub myself? The folders I pulled, contain dozens of subfolders and lots of headers.

    Any help appreciated

    SGaistS 1 Reply Last reply
    0
    • Q Qtpp

      @Christian-Ehrlicher

      Oh, well... What's the best way to do so?
      I'm using QtCreator and minGW on Windows 10.

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #6

      Either build and install it by yourself or write a proper ExternalProject_add() script for it and use this.

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

      Q 1 Reply Last reply
      0
      • Q Qtpp

        Hi there,

        I'm new to Qt and relatively new to C++.
        How can I add libraries/code I pulled from GitHub (or somewhere else) to my QMake project?
        There are no .lib files, so the Wizard in QtCreator to add dynamic libraries doesn't work.
        I already added the INCLUDEPATH to my .pro file and I managed to include the headers, I need... and now?!
        I still get undefinded reference to ..... messages when using functions from there.
        Do I need to compile the whole code from GitHub myself? The folders I pulled, contain dozens of subfolders and lots of headers.

        Any help appreciated

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi and welcome to devnet,

        Did you build and install that library ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        Q 1 Reply Last reply
        1
        • SGaistS SGaist

          Hi and welcome to devnet,

          Did you build and install that library ?

          Q Offline
          Q Offline
          Qtpp
          wrote on last edited by
          #3

          @SGaist

          I pulled the code via git pull into my "D:/dev/lib/" directory where I want to collect all additonal libs I'm planning to use and added that path to INCLUDEPATH.

          So I have to build the library separately?!
          I thought I can just include and "use" the headers from there since I pointed to the place where all the code from GitHub is located?

          Christian EhrlicherC 1 Reply Last reply
          0
          • Q Qtpp

            @SGaist

            I pulled the code via git pull into my "D:/dev/lib/" directory where I want to collect all additonal libs I'm planning to use and added that path to INCLUDEPATH.

            So I have to build the library separately?!
            I thought I can just include and "use" the headers from there since I pointed to the place where all the code from GitHub is located?

            Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @Qtpp said in Include code from GitHub in Qt project:

            So I have to build the library separately?!

            Yes

            I thought I can just include and "use" the headers from there since I pointed to the place where all the code from GitHub is located?

            Github normally provides source code in the git repos, not pre-compiled libraries.

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

            Q 1 Reply Last reply
            2
            • Christian EhrlicherC Christian Ehrlicher

              @Qtpp said in Include code from GitHub in Qt project:

              So I have to build the library separately?!

              Yes

              I thought I can just include and "use" the headers from there since I pointed to the place where all the code from GitHub is located?

              Github normally provides source code in the git repos, not pre-compiled libraries.

              Q Offline
              Q Offline
              Qtpp
              wrote on last edited by
              #5

              @Christian-Ehrlicher

              Oh, well... What's the best way to do so?
              I'm using QtCreator and minGW on Windows 10.

              Christian EhrlicherC 1 Reply Last reply
              0
              • Q Qtpp

                @Christian-Ehrlicher

                Oh, well... What's the best way to do so?
                I'm using QtCreator and minGW on Windows 10.

                Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #6

                Either build and install it by yourself or write a proper ExternalProject_add() script for it and use this.

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

                Q 1 Reply Last reply
                0
                • Christian EhrlicherC Christian Ehrlicher

                  Either build and install it by yourself or write a proper ExternalProject_add() script for it and use this.

                  Q Offline
                  Q Offline
                  Qtpp
                  wrote on last edited by
                  #7

                  @Christian-Ehrlicher

                  Are there any good tutorials how to do this?

                  jsulmJ 1 Reply Last reply
                  0
                  • Q Qtpp

                    @Christian-Ehrlicher

                    Are there any good tutorials how to do this?

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #8

                    @Qtpp said in Include code from GitHub in Qt project:

                    Are there any good tutorials how to do this?

                    Many project provide a text file in their repository describing how to build - did you check that? You did not even say whether this project uses CMake, QMake or something else...

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    Q 1 Reply Last reply
                    1
                    • jsulmJ jsulm

                      @Qtpp said in Include code from GitHub in Qt project:

                      Are there any good tutorials how to do this?

                      Many project provide a text file in their repository describing how to build - did you check that? You did not even say whether this project uses CMake, QMake or something else...

                      Q Offline
                      Q Offline
                      Qtpp
                      wrote on last edited by
                      #9

                      @jsulm said in Include code from GitHub in Qt project:

                      You did not even say whether this project uses CMake, QMake or something else...

                      The GitHub project contains a CMakeLists.txt
                      I'm using QMake (Qt5.15 with QtCreator).

                      I tried to build the library or code from GitHub using CMake GUI, but it failed.

                      Will look for alternatives or any pre-compiled library where I can include the *.lib directly.

                      Thank you all :)

                      jsulmJ 1 Reply Last reply
                      0
                      • Q Qtpp has marked this topic as solved on
                      • Q Qtpp

                        @jsulm said in Include code from GitHub in Qt project:

                        You did not even say whether this project uses CMake, QMake or something else...

                        The GitHub project contains a CMakeLists.txt
                        I'm using QMake (Qt5.15 with QtCreator).

                        I tried to build the library or code from GitHub using CMake GUI, but it failed.

                        Will look for alternatives or any pre-compiled library where I can include the *.lib directly.

                        Thank you all :)

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #10

                        @Qtpp said in Include code from GitHub in Qt project:

                        but it failed

                        This does not help to understand and solve the problem.
                        You should provide more details...

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0

                        • Login

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