|
Hey there and 'hello' from a new user!
With some minor experience in Java, C, and Python, I am currently trying to learn C++. I am using KDevelop 4.4.1 under openSUSE 12.3 and KDE 4.10. After some research concerning building and running my examples with KDevelop the IDE works pretty fine for me, except for one thing: my C++ textbook uses several C++11 techniques, and the building process of KDevelop won't accept them. I already did some research, but it seems to me there's no way to simply add compiler settings like '-std=c++11' in any preferences dialogue. Some answers regarding compiler options that I found on the web lead to manually editing the makefile created by KDevelop. Is this the only possibility to compile my examples with C++11 support? And if so, since I don't have any experience with makefiles and would like to concentrate on C++ itself for the time being, what line do I have to add to which file? Any help is appreciated. All the best, Dennis |
Administrator
|
Which build system does the KDevelop project you have created use?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
|
I create the projects as simple CMake projects, which is the only option KDevelop gives me besides Qt project. |
Global Moderator
|
There is no such thing as a "KDevelop build process" -- KDevelop just calls CMake. To enable c++11 in cmake, add e.g. this to your CMakeLists.txt:
Greetings
I'm working on the KDevelop IDE.
|
|
@scummos - that did the trick, thank you so much.
This should definitely be an option in one of the dialogs for creating a new project! |
Global Moderator
|
I guess that could be implemented as a "C++11" variant for one (or more) of the project templates.
I'm working on the KDevelop IDE.
|
Registered Member
|
Years go by, problems persist.
I've had a problem with "‘to_string’ was not declared in this scope" error and solved it with scummos solution (thanks scummos!) It seems that error was common during y2013 according to SO (http://stackoverflow.com/questions/1556 ... d-in-scope , http://stackoverflow.com/questions/1297 ... -says-so-g), but it's y2015 now. The name of this topic is misleading, it's about c++11 support, and I wanted to enter the name of to_string func. so that anyone with same problem could find this using search. Again, thanks scummos! |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]