Is there a workaround for this ?
-
In QT Creator, When you go to : File-->New File or Project --> NON-QT Projects --> Plain C Application --> Choose-->Enter a Name for Project-->Next-->Next-->Finish
(1)the default file created is main.c and it contains :
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello World!\n");
return 0;
}I want main.c to be empty.
is there a way to make main.c empty when we open a plain C application project ?(2) Why is it that there are no items in Class View when I choose "class view" from the drop down list at the top left corner ?(when you create a plain C++ project with the default main.cpp in it and a few other classes thrown in )
-
Hi, welcome to the forum.
-
You can go to the
<Qt Creator install dir>/share/qtcreator/templates/wizards/projects/plainc
directory and edit themain.c
template file to be whatever you want. -
It works for me. Which build system/compiler/OS do you use?
-
-
AFAIK CMake integration is getting better but is still a work in progress. Some stuff works, some doesn't. See the docs for an overview what's already implemented. If I'm not mistaken adding files is done by editing the
CMakeLists.txt
.