How to create a C project?
I'm using Kdevelop to c开发者_如何学编程reate C++ projects. Now I need to create a C project. In 3.xx versions, I had the option to create C projects, but now I'm using Kdevelop 4.2 and I only can see C++ project templates( QT / NOGui ).
How should I configure Kdevelop for C projects?
Have you checked the "show all project templates" while you were in the New Project dialog box? See this question as reference (look at the screenshot): kdevelop 4.0 : No project Templates
i know this is an old post but just in case .. here is a quick answer - requires a little thinking but not difficult.
(optional) install kapptemplate - this will put even more templates here:
/usr/share/kde4/apps/kdevappwizard/
first step is just to provide more defaults - these will show up in kdevelop or you can run kdevappwizard alone. this is what will be in the directory:
├── kdevappwizard.rc ├── template_previews │ ├── akonadi-resources.png │ ├── akonadi-serializer.png │ ├── default-kdevelop.png │ ├── default.png ... └── templates ├── akonadiresource.tar.bz2 ├── akonadiserializer.tar.bz2 ├── cmake_plaincpp.tar.bz2 ├── cmake_qt4core_qtest.tar.bz2 ... └── simple_phpapp.tar.bz2
copy a couple of the simple ones, say simple_phpapp.tar.bz2 and cmake_plaincpp.tar.bz2 into a sandbox dir and unpack them.
- then, check out what is there and use the files and the naming scheme of the files as a model - adjust to suit your needs and
- pack up in similar fashion,
place in same directory as above or in ~/.kde/apps/kdevappwizard/..etc. - et voila!
Note: the preview image is optional - you can skip it.`
eh - i know, thats kinda vague but if you can program in C you can probably handle it :)
To use them just copy the archives to /usr/share/apps/kdevappwizard/templates/
CMake template: https://sourceforge.net/projects/otzy-007.u/files/cmake_plainc.tar.bz2/download
Makefile template: http://opendesktop.org/content/show.php/Simple+C+Makefile+Template?content=138514
精彩评论