Reputation: 53
I want to start using QtCreator for C++ coding...
However, I need to understand how I can create a new project - just a straight C++ project (not Qt) - from a bunch of existing .cpp and header files. How do I import these into a new C++ project...? How do I get it built...? How do I get QtCreator to build all the neccessary make files etc...?
Been googling this for ages without finding a straight answer.
many thanks
Upvotes: 2
Views: 2226
Reputation: 11832
The documentation of Qt Creator is available online so it is a bit surprising that Google could not help you find it.
Creating Projects: https://qt-project.org/doc/qtcreator-3.0/creator-project-creating.html
Building and Running: https://qt-project.org/doc/qtcreator-3.0/creator-building-running.html
Upvotes: 1
Reputation: 28932
C++ uses a compiler (like gcc
) for compiling and a linker (like ld
aka gcc
) for linking. You will be typically compiling multiple C++ files all of which will need to be linked together.
The script that will do all of this for you is normally a Makefile
that is executed using the make
program.
Qt has a tool called qmake
that can do most of the leg-work for you. Normally you go to the directory with your source, run qmake -project
to generate a Qt project then run qmake
to generate a standard Makefile. finally you call make to build your source.
Upvotes: 2