cmake download - How can Qt Creator be used as general C++IDE(no usage of Qt library)?
tutorial is (5)
I've been looking around for a nice C++ IDE, and I really like the features and performance of Qt Creator, and I plan to use it to make Qt based applications down the road. However, for right now, I just want to use Qt creator as general purpose C++ IDE without the use of the Qt library. How can I go about using Qt creator just for regular C++ development? What configurations do I need to make? I would appreciate some detailed guidance with this.
Thank you for your time and cooperation. I appreciate it, and I hope to hear from you all soon.
I do it constantly.
You have two options:
use qmake project files: to get rid of all the remaining Qt stuff, add these to your project file(s):
CONFIG -= qt DEFINES -= UNICODE QT_LARGEFILE_SUPPORT
Remember that qmake itself is still required to build. So you'll most likely need a Qt installation.
use Cmake project files.
Both cases can count on Qt Creator's full support (for files and projects in the left pane). git and svn support in Qt Creator is awesome
I'm using Qt Creator with CMake on Ubuntu. I still usually compile in a terminal window so it really doesn't matter which build system you use. CMake's and qmake's project files just makes it easy to import code files into the IDE. I'm also using GCC 4.6 from Ubuntu's repositories so it's newer and has better support for C++11 than the one that currently comes with Qt SDK. I have Qt Creator also installed from Ubuntu's repositories. Everything works so beautifully that I could cry.
I started using Qt Creator recently because I spend more and more time on my 13" laptop and just love the way it utilizes space. Other than that, it is feature-rich, fast, reliable and Qt isn't bad at all. As for C++ only IDE, it is more than welcome in my life.
The only other IDE that I love as much as Qt Creator is Code::Blocks. (I often switch between the two, depending on which machine I use)
I did use Qt Creator for a non-Qt project once, but only for its code-editing features and code completion. I built the project and worked with the rcs from a separate terminal window. All I can say is that I was satisfied with Qt creator as a C++ code editor.
The answer to run
valgrind --tool=callgrind is not quite complete without some options. We usually do not want to profile 10 minutes of slow startup time under Valgrind and want to profile our program when it is doing some task.
So this is what I recommend. Run program first:
valgrind --tool=callgrind --dump-instr=yes -v --instr-atstart=no ./binary > tmp
Now when it works and we want to start profiling we should run in another window:
callgrind_control -i on
This turns profiling on. To turn it off and stop whole task we might use:
Now we have some files named callgrind.out.* in current directory. To see profiling results use:
I recommend in next window to click on "Self" column header, otherwise it shows that "main()" is most time consuming task. "Self" shows how much each function itself took time, not together with dependents.