Skip to content

[bug] incList 中生成的包含路径多了一级 ../,导致编译找不到头文件 #564

Description

@6617king

What are you doing?
Creating a new ARM GCC project and adding include paths via EIDE's configuration UI, then trying to build.
Describe the bug
The include paths generated in .eide/eide.yml incList have an extra ../ prefix, causing the compiler to resolve them relative to the parent directory of the project root. This results in fatal error: No such file or directory for all headers.
To Reproduce

  1. Create a new ARM GCC project in EIDE
  2. Open the project configuration → C/C++ Preprocessor → Include Paths
  3. Add a path like firmware/cmsis/inc
  4. Open .eide/eide.yml, observe incList shows ../firmware/cmsis/inc instead of firmware/cmsis/inc
  5. Click Build
  6. See error: fatal error: gd32h7xx_hal.h: No such file or directory
    Expected behavior
    The include paths in incList should be relative to the project root directory, matching the compiler's working directory. The ../ prefix should not be added.
    Screenshots
    N/A
    Desktop:
  • OS: Windows 10
  • EIDE Version: v3.27.2
  • VSCode Version: v1.98.0
    Additional context
    The root cause: EIDE computes incList paths relative to the .eide/ directory, but the compiler runs from the project root. For example, compile command shows -I../firmware/cmsis/inc when it should be -Ifirmware/cmsis/inc. Manually removing the ../ prefix from .eide/eide.yml fixes the build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions