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.


5 comments:

Emrah Özer said...

Thanks for the tut. How do you set up the sdk for cpp ? ( There is a conflict about it, where to download which one to choose )

ccube said...

Please make this compatible with intellij 11 or release source code that others can do! :)

Dennis Ruiz said...

please!
show us your SDK config for cpp

Alexander++ said...

Guys, did anyone manage to configure C++ SDK on linux or macosx?

masalababes said...

Where can I download the plugin for Intellij Idea 8.1.4