Eclipse CDT + GNU ARM 中的奇怪包含路径

hga*_*abe 4 eclipse arm gnu

在修改了一些项目设置(即更改 FPU 类型)后,包含中出现了一些奇怪的条目,例如:

项目/#undef __ARM_NEON

这些不会显示在任何可以指定包含的常用位置(C/C++ 构建 -> 设置 -> 工具设置 -> 编译器 xy -> 包含)。

这个明显无效的包含路径会在“问题”选项卡上创建一条恼人的警告消息。

有时,对 FPU 设置进行更多修改会使这些条目消失,或导致出现更多类似的条目,但我在这里看不到任何逻辑行为。这是一个错误吗?

截屏

小智 5

解决方法请参见:http://blog.bachi.net/?m =201409。

workspace.metadata.pluginsorg.eclipse.cdt.coreROME2_P1_A2.language.settings.xml

消除:

<entry kind="includePath" name="/${ProjName}/#undef __ARM_FP">
    <flag value="BUILTIN|READONLY|VALUE_WORKSPACE_PATH"/>
</entry>
<entry kind="includePath" name="/${ProjName}/#undef __ARM_FEATURE_FMA">
    <flag value="BUILTIN|READONLY|VALUE_WORKSPACE_PATH"/>
</entry>
<entry kind="includePath" name="/${ProjName}/#undef __ARM_NEON__">
    <flag value="BUILTIN|READONLY|VALUE_WORKSPACE_PATH"/>
</entry>
<entry kind="includePath" name="/${ProjName}/#undef __ARM_NEON">
    <flag value="BUILTIN|READONLY|VALUE_WORKSPACE_PATH"/>
</entry>
Run Code Online (Sandbox Code Playgroud)

添加:

<language id="org.eclipse.cdt.core.g++">
    <entry kind="includePath" name="C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q1-update/arm-none-eabi/include/c++/6.3.1">
        <flag value="BUILTIN|READONLY"/>
    </entry>
    <entry kind="includePath" name="C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q1-update/arm-none-eabi/include/c++/6.3.1/arm-none-eabi/thumb/v8-m.main">
        <flag value="BUILTIN|READONLY"/>
    </entry>
    <entry kind="includePath" name="C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q1-update/arm-none-eabi/include/c++/6.3.1/backward">
        <flag value="BUILTIN|READONLY"/>
    </entry>
    <entry kind="includePath" name="C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q1-update/lib/gcc/arm-none-eabi/6.3.1/include">
        <flag value="BUILTIN|READONLY"/>
    </entry>
    <entry kind="includePath" name="C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q1-update/lib/gcc/arm-none-eabi/6.3.1/include-fixed">
        <flag value="BUILTIN|READONLY"/>
    </entry>
    <entry kind="includePath" name="C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q1-update/arm-none-eabi/include">
        <flag value="BUILTIN|READONLY"/>
    </entry>
</language>
Run Code Online (Sandbox Code Playgroud)