Проблема с запуском C/C ++ с Code Runner на VSCODEC++

Программы на C++. Форум разработчиков
Ответить
Anonymous
 Проблема с запуском C/C ++ с Code Runner на VSCODE

Сообщение Anonymous »

У меня проблемы с запуском файлов C & CPP с Code Runner с использованием символа «*». Если кто -то может знать эту проблему, пожалуйста, дайте мне знать, так как это было непрерывной проблемой за последние месяцы < /p>
Сообщение об ошибке с *.c: < /p>
gcc *.c -o main
cc1.exe: fatal error: *.c: Invalid argument
compilation terminated.
< /code>
settings.json file для бега кода: < /p>
{
"workbench.colorTheme": "Default Dark Modern",
"code-runner.executorMap": {

"javascript": "node",
"java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
"c": "cd $dir && gcc *.c -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"zig": "zig run",
//"cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", // original line for cpp
"cpp": "cd $dir && g++ -std=c++14 *.cpp -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"php": "php",
"python": "python -u",
"perl": "perl",
"perl6": "perl6",
"ruby": "ruby",
"go": "go run",
"lua": "lua",
"groovy": "groovy",
"powershell": "powershell -ExecutionPolicy ByPass -File",
"bat": "cmd /c",
"shellscript": "bash",
"fsharp": "fsi",
"csharp": "scriptcs",
"vbscript": "cscript //Nologo",
"typescript": "ts-node",
"coffeescript": "coffee",
"scala": "scala",
"swift": "swift",
"julia": "julia",
"crystal": "crystal",
"ocaml": "ocaml",
"r": "Rscript",
"applescript": "osascript",
"clojure": "lein exec",
"haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
"rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
"racket": "racket",
"scheme": "csi -script",
"ahk": "autohotkey",
"autoit": "autoit3",
"dart": "dart",
"pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
"d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
"haskell": "runghc",
"nim": "nim compile --verbosity:0 --hints:off --run",
"lisp": "sbcl --script",
"kit": "kitc --run",
"v": "v run",
"sass": "sass --style expanded",
"scss": "scss --style expanded",
"less": "cd $dir && lessc $fileName $fileNameWithoutExt.css",
"FortranFreeForm": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"fortran-modern": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"fortran_fixed-form": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"sml": "cd $dir && sml $fileName",
"mojo": "mojo run",
"erlang": "escript",
"spwn": "spwn build",
"pkl": "cd $dir && pkl eval -f yaml $fileName -o $fileNameWithoutExt.yaml",
"gleam": "gleam run -m $fileNameWithoutExt"
},
"workbench.editorAssociations": {
"*.exe": "default"
},
"code-runner.languageIdToFileExtensionMap": {

"bat": ".bat",
"powershell": ".ps1",
"typescript": ".ts"
},
"code-runner.runInTerminal": true,
"security.workspace.trust.untrustedFiles": "open",
"redhat.telemetry.enabled": true,
"jdk.jdkhome": // removed path
"files.associations": {
"*.py": "python"
},
"liveServer.settings.donotShowInfoMsg": true,
"jdk.telemetry.enabled": false
}
< /code>
Все пути правильные. Компилятор работает правильно. Единственная проблема - с фатальной ошибкой.

Подробнее здесь: https://stackoverflow.com/questions/797 ... -on-vscode
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C++»