在 10/11/21 1:10 PM, Tom Kacvinsky via Gcc-help 写道:
It seems that the link can not fond some lib, but the real reason is that the project path and source code file on windows environment is too long. But,if we use the same GCC version to compile my project on Linux enviroment, it can compile sucess. The GCC compiler and source code we used on Linux is same with Windos. We don't know how the GCC restict the path lenth and source code file
The conventional DOS path has a hard limit of 259 characters: 3 for the drive letter and immediate colon-slash, and 256 for the path itself. (If the null terminator is counted then it's 260 characters, which is exactly the value of `PATH_MAX`.)
The simple solution is to move the toolchain to somewhere shallower, apparently.The permanent solution to this problem would be using UNC paths. For example, instead of writing `C:\Windows`, you write `\\?\C:\Windows`. This makes use of a 64KiB buffer, but please note Windows NT uses UTF-16 paths, so the length limit of a path is 32767 UTF-16 code units.
-- Best regards, LIU Hao
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature