[Qt-creator] QtCreator for plain C project

Campbell Barton ideasman42 at gmail.com
Thu Mar 10 22:37:47 CET 2011


On Thu, Mar 10, 2011 at 11:11 AM, Nils Jeisecke <njeisecke at saltation.de> wrote:
> Hi!
>
> I'm using Qt Creator with cmake for plain C projects. Works great
> though sometimes code navigation and "Find Usage" do not work 100%
> correctly for c code.
>
> You could use this minimal cmake file as a reference:
>
> project(Demo)
> set(DEMO_SRCS demo.c)
> add_executable(demo ${DEMO_SRCS})
>
> Nils

Nils, you may have this problems if you don't include the headers in
cmake files, for building you dont need to but for MSVC and QtCreator
its worth manually including header files.

So:
  project(Demo)
  set(DEMO_SRCS demo.c demo.h)
  add_executable(demo ${DEMO_SRCS})

Example on larger project:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/source/blender/nodes/CMakeLists.txt



More information about the Qt-creator-old mailing list