Sunday, April 19, 2009

Starting new C/C++ project in IntelliJ IDEA

This task becomes possible in traditional IDEA style.
Prerequisites:

Steps:

  • Choose 'Create new project' action e.g. on Welcome page, select new project

  • Choose C++ module type and type module name

  • Specify C++ sdk if needed

  • Specify to create source directory

  • Specify to add entry point and build file

After that file <module name> .c or .cpp is created. In the editor live error checking and navigation work in expected way.




The project can be compiled via invoking Make (e.g. pressing Control + F9 on windows or Meta + F9 on MacOS) action.



To invoke resulting executable file one can create Cpp run configuration and its settings specify executable file path / working directory and parameters.