eide icon indicating copy to clipboard operation
eide copied to clipboard

[bug] GCC编译时候中文路径乱码问题

Open LLreader opened this issue 7 months ago • 0 comments

在编译时候vscode日志显示执行的命令是 “cmd.exe /C "unify_builder -p "d:\Code\STM32\EIDE\STM32_Study\7-1 AD单通道\build\Debug\builder.params""”

然后链接器收到的路径会带有乱码导致编译失败 F:/Programing/STM32CubeIDE/STM32CubeCLT_1.18.0/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file d:/Code/STM32/EIDE/STM32_Study/7-1 AD锟斤拷通锟斤拷/stm32f1x_64KB_flash.ld: No such file or directory collect2.exe: error: ld returned 1 exit status

builder.params文件里面的中文字符是能正常用UTF-8解码的,里面linker部分如下,感觉也没什么问题

    "linker": {
        "output-format": "elf",
        "remove-unused-input-sections": true,
        "LIB_FLAGS": "-lm",
        "$toolName": "g++",
        "link-scatter": [
            "\"d:/Code/STM32/EIDE/STM32_Study/7-1 AD单通道/stm32f1x_64KB_flash.ld\""
        ]
    }

如果将项目文件夹改为纯ASCII码的话就不会有问题,所以倒也不是特别影响使用

环境如下: Windows 10 22H2 EIDE插件版本 3.21.3 VSCode版本 1.100.2

LLreader avatar May 29 '25 14:05 LLreader