How to add pre processing defs (macros) to qt creator?

后端 未结 6 1032
面向向阳花
面向向阳花 2020-12-14 00:42

In Eclipse there is an option to specify pre processing defines (#ifdef macros) to a project by using the Symbols option in Paths and Symbols. This helps in effective indexi

6条回答
  •  臣服心动
    2020-12-14 01:38

    From the QT Documentation:

    The defines are specified in the .config file. The .config file is a regular C++ file, prepended to all your source files when they are parsed. Only use the .config file to add lines as in the example below:

    #define NAME value
    

    That is, if you import a project named MyProject, then the pre-processor definitions should be specified in MyProject.config

    For my projects it causes the indexer to recognize this define project wide and changed the auto-complete to reflect this.

提交回复
热议问题