I'm sitting in Ubuntu 12.04 with Qt Creator v2.7 (tried new one aswell, 2.8 beta) and when I create a Non-Qt Project / Plain C++ Project (CMake Build) all seems well. But when I right-click on the project to Add New, that option is disabled. So is Add Existing Files..., New Subproject and Add Library.
Am I missing something obvious? I think I've been through pretty much all of the menus but I can't find anything seemingly related to this issue.
Thank you!
That's because you have to add the file/s in CMakeLists.txt
and this makes sense because you explicitly choosing cmake
over the internal building system.
Add the file to the CMakeLists.txt
file.
Note: If you added another file while working on the same project, that new .cpp
file would already be added in the same folder structure as your current project. In that case, no changes to CMakeLists.txt
are required.
Now simply, right click on the project entry and click on "Run CMake". This will automatically add the newly created .cpp
file to the project structure and it will be shown in the project outline view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With