Anonymous
Как мне установить файлы .json в vscode?
Сообщение
Anonymous » 13 июл 2024, 23:09
Как мне разместить файлы .JSON в каталоге C++:
task.JSON
launch. JSON
c_cpp_properties.JSON
settings.JSON
Я' использую GCC.
Мои текущие конфигурации:
1. запуск.JSON
Код: Выделить всё
{
"configurations": [
{
"name": "windows-gcc-x64",
"includePath": [
"${workspaceFolder}/**"
],
"compilerPath": "C:/msys64/ucrt64/bin/gcc.exe",
"cStandard": "${default}",
"cppStandard": "${default}",
"intelliSenseMode": "windows-gcc-x64",
"compilerArgs": [
""
]
}
],
"version": 4
}
2. c_cpp_properties.JSON
Код: Выделить всё
{
"configurations": [
{
"name": "windows-gcc-x64",
"includePath": [
"${workspaceFolder}/**"
],
"compilerPath": "C:/msys64/ucrt64/bin/gcc.exe",
"cStandard": "${default}",
"cppStandard": "${default}",
"intelliSenseMode": "windows-gcc-x64",
"compilerArgs": [
""
]
}
],
"version": 4
}
# **settings.JSON**
{
"C_Cpp_Runner.cCompilerPath": "gcc",
"C_Cpp_Runner.cppCompilerPath": "g++",
"C_Cpp_Runner.debuggerPath": "gdb",
"C_Cpp_Runner.cStandard": "",
"C_Cpp_Runner.cppStandard": "",
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat",
"C_Cpp_Runner.useMsvc": false,
"C_Cpp_Runner.warnings": [
"-Wall",
"-Wextra",
"-Wpedantic",
"-Wshadow",
"-Wformat=2",
"-Wcast-align",
"-Wconversion",
"-Wsign-conversion",
"-Wnull-dereference"
],
"C_Cpp_Runner.msvcWarnings": [
"/W4",
"/permissive-",
"/w14242",
"/w14287",
"/w14296",
"/w14311",
"/w14826",
"/w44062",
"/w44242",
"/w14905",
"/w14906",
"/w14263",
"/w44265",
"/w14928"
],
"C_Cpp_Runner.enableWarnings": true,
"C_Cpp_Runner.warningsAsError": false,
"C_Cpp_Runner.compilerArgs": [],
"C_Cpp_Runner.linkerArgs": [],
"C_Cpp_Runner.includePaths": [],
"C_Cpp_Runner.includeSearch": [
"*",
"**/*"
],
"C_Cpp_Runner.excludeSearch": [
"**/build",
"**/build/**",
"**/.*",
"**/.*/**",
"**/.vscode",
"**/.vscode/**"
],
"C_Cpp_Runner.useAddressSanitizer": false,
"C_Cpp_Runner.useUndefinedSanitizer": false,
"C_Cpp_Runner.useLeakSanitizer": false,
"C_Cpp_Runner.showCompilationTime": false,
"C_Cpp_Runner.useLinkTimeOptimization": false,
"C_Cpp_Runner.msvcSecureNoWarnings": false
}
3. настройки.JSON
Код: Выделить всё
{
"C_Cpp_Runner.cCompilerPath": "gcc",
"C_Cpp_Runner.cppCompilerPath": "g++",
"C_Cpp_Runner.debuggerPath": "gdb",
"C_Cpp_Runner.cStandard": "",
"C_Cpp_Runner.cppStandard": "",
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat",
"C_Cpp_Runner.useMsvc": false,
"C_Cpp_Runner.warnings": [
"-Wall",
"-Wextra",
"-Wpedantic",
"-Wshadow",
"-Wformat=2",
"-Wcast-align",
"-Wconversion",
"-Wsign-conversion",
"-Wnull-dereference"
],
"C_Cpp_Runner.msvcWarnings": [
"/W4",
"/permissive-",
"/w14242",
"/w14287",
"/w14296",
"/w14311",
"/w14826",
"/w44062",
"/w44242",
"/w14905",
"/w14906",
"/w14263",
"/w44265",
"/w14928"
],
"C_Cpp_Runner.enableWarnings": true,
"C_Cpp_Runner.warningsAsError": false,
"C_Cpp_Runner.compilerArgs": [],
"C_Cpp_Runner.linkerArgs": [],
"C_Cpp_Runner.includePaths": [],
"C_Cpp_Runner.includeSearch": [
"*",
"**/*"
],
"C_Cpp_Runner.excludeSearch": [
"**/build",
"**/build/**",
"**/.*",
"**/.*/**",
"**/.vscode",
"**/.vscode/**"
],
"C_Cpp_Runner.useAddressSanitizer": false,
"C_Cpp_Runner.useUndefinedSanitizer": false,
"C_Cpp_Runner.useLeakSanitizer": false,
"C_Cpp_Runner.showCompilationTime": false,
"C_Cpp_Runner.useLinkTimeOptimization": false,
"C_Cpp_Runner.msvcSecureNoWarnings": false
}
пожалуйста, дайте также конфигурацию для задач.JSON
Может быть, это как-то связано с версией:
Версия gcc — gcc (Rev3, созданная в рамках проекта MSYS2) 14.1.0
Версия g++ — g++ (Rev3, созданная в рамках проекта MSYS2) 14.1 .0
Версия gdb – GNU gdb (GDB) 15.1
Эта ошибка продолжает появляться, когда я запустить программу:
Код: Выделить всё
PS C:\Users\Admin\Desktop\c++ programs\dsa mosh> cd "c:\Users\Admin\Desktop\c++ programs\dsa mosh\" ; if ($?) { g++ pointers.cpp -o pointers } ; if ($?) { .\pointers }
collect2.exe: error: ld returned 116 exit status
И еще, как настроить его для каталога c?
Я провожу целый день за чтением документации vscode и поиском в Интернете.
Будьте вежливы, я задаю вопрос уже второй раз (в последний раз, когда я задавал вопрос, он был удален).
Подробнее здесь:
https://stackoverflow.com/questions/787 ... -in-vscode
1720901388
Anonymous
Как мне разместить файлы .JSON в каталоге C++: [list] [*]task.JSON [*]launch. JSON [*]c_cpp_properties.JSON [*]settings.JSON [/list] Я' использую GCC. Мои текущие конфигурации: 1. запуск.JSON [code] { "configurations": [ { "name": "windows-gcc-x64", "includePath": [ "${workspaceFolder}/**" ], "compilerPath": "C:/msys64/ucrt64/bin/gcc.exe", "cStandard": "${default}", "cppStandard": "${default}", "intelliSenseMode": "windows-gcc-x64", "compilerArgs": [ "" ] } ], "version": 4 } [/code] 2. c_cpp_properties.JSON [code] { "configurations": [ { "name": "windows-gcc-x64", "includePath": [ "${workspaceFolder}/**" ], "compilerPath": "C:/msys64/ucrt64/bin/gcc.exe", "cStandard": "${default}", "cppStandard": "${default}", "intelliSenseMode": "windows-gcc-x64", "compilerArgs": [ "" ] } ], "version": 4 } # **settings.JSON** { "C_Cpp_Runner.cCompilerPath": "gcc", "C_Cpp_Runner.cppCompilerPath": "g++", "C_Cpp_Runner.debuggerPath": "gdb", "C_Cpp_Runner.cStandard": "", "C_Cpp_Runner.cppStandard": "", "C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat", "C_Cpp_Runner.useMsvc": false, "C_Cpp_Runner.warnings": [ "-Wall", "-Wextra", "-Wpedantic", "-Wshadow", "-Wformat=2", "-Wcast-align", "-Wconversion", "-Wsign-conversion", "-Wnull-dereference" ], "C_Cpp_Runner.msvcWarnings": [ "/W4", "/permissive-", "/w14242", "/w14287", "/w14296", "/w14311", "/w14826", "/w44062", "/w44242", "/w14905", "/w14906", "/w14263", "/w44265", "/w14928" ], "C_Cpp_Runner.enableWarnings": true, "C_Cpp_Runner.warningsAsError": false, "C_Cpp_Runner.compilerArgs": [], "C_Cpp_Runner.linkerArgs": [], "C_Cpp_Runner.includePaths": [], "C_Cpp_Runner.includeSearch": [ "*", "**/*" ], "C_Cpp_Runner.excludeSearch": [ "**/build", "**/build/**", "**/.*", "**/.*/**", "**/.vscode", "**/.vscode/**" ], "C_Cpp_Runner.useAddressSanitizer": false, "C_Cpp_Runner.useUndefinedSanitizer": false, "C_Cpp_Runner.useLeakSanitizer": false, "C_Cpp_Runner.showCompilationTime": false, "C_Cpp_Runner.useLinkTimeOptimization": false, "C_Cpp_Runner.msvcSecureNoWarnings": false } [/code] 3. настройки.JSON [code]{ "C_Cpp_Runner.cCompilerPath": "gcc", "C_Cpp_Runner.cppCompilerPath": "g++", "C_Cpp_Runner.debuggerPath": "gdb", "C_Cpp_Runner.cStandard": "", "C_Cpp_Runner.cppStandard": "", "C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat", "C_Cpp_Runner.useMsvc": false, "C_Cpp_Runner.warnings": [ "-Wall", "-Wextra", "-Wpedantic", "-Wshadow", "-Wformat=2", "-Wcast-align", "-Wconversion", "-Wsign-conversion", "-Wnull-dereference" ], "C_Cpp_Runner.msvcWarnings": [ "/W4", "/permissive-", "/w14242", "/w14287", "/w14296", "/w14311", "/w14826", "/w44062", "/w44242", "/w14905", "/w14906", "/w14263", "/w44265", "/w14928" ], "C_Cpp_Runner.enableWarnings": true, "C_Cpp_Runner.warningsAsError": false, "C_Cpp_Runner.compilerArgs": [], "C_Cpp_Runner.linkerArgs": [], "C_Cpp_Runner.includePaths": [], "C_Cpp_Runner.includeSearch": [ "*", "**/*" ], "C_Cpp_Runner.excludeSearch": [ "**/build", "**/build/**", "**/.*", "**/.*/**", "**/.vscode", "**/.vscode/**" ], "C_Cpp_Runner.useAddressSanitizer": false, "C_Cpp_Runner.useUndefinedSanitizer": false, "C_Cpp_Runner.useLeakSanitizer": false, "C_Cpp_Runner.showCompilationTime": false, "C_Cpp_Runner.useLinkTimeOptimization": false, "C_Cpp_Runner.msvcSecureNoWarnings": false } [/code] пожалуйста, дайте также конфигурацию для задач.JSON Может быть, это как-то связано с версией: [b]Версия gcc — gcc (Rev3, созданная в рамках проекта MSYS2) 14.1.0[/b] [b]Версия g++ — g++ (Rev3, созданная в рамках проекта MSYS2) 14.1 .0[/b] [b]Версия gdb – GNU gdb (GDB) 15.1[/b] Эта ошибка продолжает появляться, когда я запустить программу: [code]PS C:\Users\Admin\Desktop\c++ programs\dsa mosh> cd "c:\Users\Admin\Desktop\c++ programs\dsa mosh\" ; if ($?) { g++ pointers.cpp -o pointers } ; if ($?) { .\pointers } collect2.exe: error: ld returned 116 exit status [/code] И еще, как настроить его для каталога c? Я провожу целый день за чтением документации vscode и поиском в Интернете. Будьте вежливы, я задаю вопрос уже второй раз (в последний раз, когда я задавал вопрос, он был удален). Подробнее здесь: [url]https://stackoverflow.com/questions/78744531/how-should-i-set-my-json-files-in-vscode[/url]