提问人:Ziad Farag 提问时间:9/5/2023 最后编辑:Ziad Farag 更新时间:9/5/2023 访问量:59
Visual Studio Code C/C++ 编译运行扩展编译错误
Visual Studio Code C/C++ Compile Run extension compiling error
问:
我无法使用“C/C++ 编译运行”扩展编译代码 我按 F6 键,然后出现以下错误:
"...cygwin64/lib/gcc/x86_64-pc-cygwin11/cc1plus.exe:error while loading shared libraries: ?: cannot open shared object file: No such file or directory"
我正在使用 cygwin64 编译器并在 Windows 7 上运行
扩展设置:
{
"C_Cpp.default.compilerPath": "E:\\cygwin64\\bin\\gcc.exe",
"editor.renderWhitespace": "all",
"terminal.integrated.defaultProfile.windows": "PowerShell",
"window.zoomLevel": 1,
"C_Cpp.files.exclude": {
"**/.vscode": true,
"**/.vs": true
},
"terminal.integrated.useWslProfiles": false,
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
},
"Cygwin": {
"path": "E:\\cygwin64\\bin\\mintty.exe",
"args": ["-"],
"icon": "terminal-cmd",
"name": "Cygwin"
}
},
"terminal.integrated.cwd": ".../Cproject",
"terminal.integrated.defaultProfile.osx": "",
"c-cpp-compile-run.cpp-compiler": "E:/cygwin64/bin/g++.exe",
"c-cpp-compile-run.c-compiler": "E:/cygwin64/bin/gcc.exe"
}
库:
ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x77930000)
kernel32.dll => /cygdrive/c/Windows/system32/kernel32.dll (0x77810000)
KERNELBASE.dll => /cygdrive/c/Windows/system32/KERNELBASE.dll (0x7fefd630000)
cygwin1.dll => /usr/bin/cygwin1.dll (0x7fed81a0000)
cyggmp-10.dll => /usr/bin/cyggmp-10.dll (0x3ff7b0000)
cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x3ff670000)
cygintl-8.dll => /usr/bin/cygintl-8.dll (0x3ff640000)
cygisl-23.dll => /usr/bin/cygisl-23.dll (0x3fe960000)
cygmpc-3.dll => /usr/bin/cygmpc-3.dll (0x3fe930000)
cygmpfr-6.dll => /usr/bin/cygmpfr-6.dll (0x3ff490000)
cyggcc_s-seh-1.dll => /usr/bin/cyggcc_s-seh-1.dll (0x3ff870000)
cygz.dll => /usr/bin/cygz.dll (0x3fedc0000)
cygzstd-1.dll => /usr/bin/cygzstd-1.dll (0x3fed10000)
此外,这些是我在cygwin中安装的软件包
curl 8.2.1-1
gcc-core 11.4.0-1
gcc-g++ 11.4.0-1
gdb 12.1-1
git 2.39.0-1
libSDL-devel 1.2.15-3
libopencv-devel 3.4.1-3
make 4.4.1-2
wget 1.21.4-1
zip 3.0-13
我尝试了一些解决方案,例如重新安装cygwin,重新安装扩展程序,并且检查了系统环境变量PATH,没有任何问题
还是没有运气。有什么想法吗?
答: 暂无答案
评论