Include code from GitHub in Qt project
-
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 theINCLUDEPATH
to my.pro
file and I managed to include the headers, I need... and now?!
I still getundefinded 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
-
Oh, well... What's the best way to do so?
I'm using QtCreator and minGW on Windows 10.Either build and install it by yourself or write a proper ExternalProject_add() script for it and use this.
-
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 theINCLUDEPATH
to my.pro
file and I managed to include the headers, I need... and now?!
I still getundefinded 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
Hi and welcome to devnet,
Did you build and install that library ?
-
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? -
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?@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.
-
@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.
Oh, well... What's the best way to do so?
I'm using QtCreator and minGW on Windows 10. -
Oh, well... What's the best way to do so?
I'm using QtCreator and minGW on Windows 10.Either build and install it by yourself or write a proper ExternalProject_add() script for it and use this.
-
Either build and install it by yourself or write a proper ExternalProject_add() script for it and use this.
Are there any good tutorials how to do this?
-
Are there any good tutorials how to do this?
@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...
-
@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...
@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 :)
-
-
@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 :)
@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...