简体   繁体   中英

Configuring C++ SDK in Intellij IDEA for Windows

I'm trying to configure Intellij to create C/C++ projects. The plugin was installed successfully but when I go to create a new project, I have to setup a Cpp SDK. Is This a path to GCC home or similar (I try it but doesn't works)? How can I perform this configuration?

Here is detailed about the configuration:

Install the plugin. There will appear no special project type for C/C++ projects. Just take/create any Java project, and the plugin will process all *.c / *.cc / *.cpp source files from the project source roots.

Then you need to specify the C/C++ dialect. Open Settings->IDE Settings->C/C++ . There are three options, which can be used for tuning:

  • Compiler selector — you may choose between GCC and MS VC dialects

  • Use C dialect — this option makes the compiler to treat the sources like C, not CPP files.

  • GCC executable namegcc is used if this field is left blank. This option is important for GCC configuration autodetection.

To parse the files you also need to specify include paths for your C/C++ environment. Currently, the plugin can automatically detect GCC include paths, in case of other compilers you need to specify the include paths by yourself. Additional include files can be specified for each project separately. Automatic gcc include paths detection works only if your compiler presents in path . If it does not (or if you want to use include-paths of a non-default compiler), then you should specify the name (full name, if necessary) of gcc executable in GCC executable name field.

UPDATE: I would suggest you to try JetBrain's CLion - The intelligent cross-platform C/C++ IDE for cross platform development.
If you are using Visual Studio then use Resharper C++ . ReSharper C++ makes Microsoft Visual Studio a much better IDE with refactorings, navigation, code inspections, quick-fixes, code generation and more productivity features for C++ development.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM