Building QT program on the Linux in QtCreator
Hello to all
I made a simple hello program in the QT Creator installed on my desktop running Ubuntu 10.04 Lucid Linux and during the creation of project there was only one folder named as the "Hello" on my Desktop and contains these files :
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
Hello.pro
Hello.pro.user
and when I build the program it created another folder named as " Hello-build-desktop " containing these files:
main.o
mainwindow.o
Makefile
moc_mainwindow.cpp
moc_mainwindow.o
ui_mainwindow.h
Hello
I want to know that what is this all about and what all files actually mean and why it create this another folder and do not compile the files in the same folder which I have created
Thank you
Piyush Pandey
Re: Building QT program on the Linux in QtCreator
Quote:
I want to know that what is this all about and what all files actually mean
The *.o files are the object files.
Google for what compiling is and what are object files.
the moc_*.cpp files are moc genrated files.
read about what the MOC is here.
Quote:
and why it create this another folder and do not compile the files in the same folder which I have created
This is the way your QtCreator is configured.
Read the QtCreator help in order to change these settings.
Re: Building QT program on the Linux in QtCreator
This is a shadow build directory. Using a shadow build directory ensures that only your source files are in the source directory and all intermediate files are elsewhere. This reduces clutter for version control systems, makes cleaning the build trivial, and makes bundling just the source trivial.
The options you want are under Projects, Build Settings and are called "Shadow Build" and "Build Directory".