Visual Studio Code for C/C++ on Linux (2021)

  Рет қаралды 114,445

CodeVault

CodeVault

Күн бұрын

Пікірлер: 241
@xperiahenrik
@xperiahenrik 3 жыл бұрын
I found that on Arch-based systems, the equivalent to getting build-essential is: sudo pacman -Sy base-devel
@sandipsky8756
@sandipsky8756 3 жыл бұрын
Thank you so much
@Gunnl
@Gunnl 3 жыл бұрын
Well.. since we are talking about Arch Linux.... the current version of vscode in Arch Linux seems to use a different marktplace where the microsoft c/c++ extension isnt available in ... so you will need to manually download the vsix file and install 'manually' the extension... for those who may need it...
@theredstonehive
@theredstonehive 2 жыл бұрын
@@Gunnl Thank you!
@yesmanic
@yesmanic 2 жыл бұрын
I've used "sudo pacman -S gdb". i dont know the difference :/
@seanhauth1683
@seanhauth1683 5 ай бұрын
thank You so much! i started using garuda linux since i find that my games run better on arch than debian and i want to still be able to do some programming but i swear, trying to find help for C++ support in vscode for arch is a pain in the butt. if i get it working then you will be my favorite person of the week lol
@annykfernandes1540
@annykfernandes1540 3 жыл бұрын
this tutorial is just perfect! helped me not only to setup, but to really understand what's happening. thank you for that.
@DNBR
@DNBR 3 жыл бұрын
wow, I searched everywhere for an answer for why I was getting a JSON error when trying to compile and run a C file in visual studio code... this video was so informative. I wish I found this hours ago.
@hennero.3826
@hennero.3826 9 ай бұрын
Thanks, that was very useful and helped me to do the initial configuration regarding these 2 files (tasks.json and launch.json). 🙂
@CodeVault
@CodeVault 8 ай бұрын
Thank very much for the donation!
@mrcrabss8270
@mrcrabss8270 3 жыл бұрын
Don't stop making videos. Your explanation to every step is really good. Thank You.
@phaedrus2633
@phaedrus2633 11 ай бұрын
Thank you so much. I couldn't get a C++ file to compile. I read the documentation for VS Code, and it talked about the tasks.json and the launch.json, but it gave such vague guidance. My frustration was going through the roof. All the other KZbin videos were not helpful as well. Your walk-through tutorial was SO HELPFUL is getting VS Code to finally work with C++.
@AyushGade-vr9hu
@AyushGade-vr9hu Жыл бұрын
Man I really don't know why this video hasn't blown in millions of example like literally. It really helped me set up my vs code. Thanks man!
@soda2096
@soda2096 2 жыл бұрын
you saved my life learning c, started yesterday and didn`t understand how to set this up on linux, you are a lifesaver
@joefontana194
@joefontana194 3 жыл бұрын
I'm a brazilian programming student, I'm larning C in my university ,and you help me very much with this video, thanks for share this knowledge
@porcohuetropadocafe20k15
@porcohuetropadocafe20k15 3 жыл бұрын
Cara, pode me ajudar? É somente baixar o vs code e a extensão? Quero migrar para o linux, somente necessito saber disto
@joefontana194
@joefontana194 3 жыл бұрын
@@porcohuetropadocafe20k15 E aí mano, só vi hj a sua mensagem, eu já programo no linux, Ubuntu, eu precisei baixar o visual Studio Code e tbm um negócio pelo terminal, q eu não me lembro o nome
@joefontana194
@joefontana194 3 жыл бұрын
@@porcohuetropadocafe20k15 Mas eu acho q se vc baixar só as extensões dá tudo certo
@joefontana194
@joefontana194 3 жыл бұрын
Eu fiquei uns 2 dias só tentando, foram tantas coisas q eu nem sei oq fiz pra dar certo
@joefontana194
@joefontana194 3 жыл бұрын
Em geral a única coisa q muda do linux pro windows é um negócio q tem q baixar, não usei pra praticamente nada oq o cara mostrou no vídeo aí
@pietrarualfred9209
@pietrarualfred9209 2 жыл бұрын
grateful for finding this channel, keep up the good work , you are making my uni life easier.
@piotr5646
@piotr5646 10 ай бұрын
Not sure why I was having a 'could not find/launch' error, which then the VScode told me to launch the json file, but somehow I deleted all the .vscode files, uninstalled all extensions and followed your tutorial from the beginning and it worked. Thank you.
@harrywhitehouse1217
@harrywhitehouse1217 Жыл бұрын
Brilliant presentation! Particularly helpful on the subtle changes to tasks.json and launch.json!!
@mdaasil2329
@mdaasil2329 3 жыл бұрын
Thank you so much! this really helped me setup my gcc in Manjaro!
@leonbishop7404
@leonbishop7404 3 жыл бұрын
the effort and enthusiasm he puts in the guide is contagious
@theping1920
@theping1920 3 жыл бұрын
finally a good tutorial man the way u explain is awesome love ur vids man.
@learnchess-kv
@learnchess-kv 2 жыл бұрын
your a god! first video that got me working c working on VS code!!
@y_red_gold_a4280
@y_red_gold_a4280 3 жыл бұрын
You are amazing bro. You solved a week-long-of-trying problem. Thank you so so so much. :)
@debbindubd
@debbindubd 2 жыл бұрын
It helps me lot, I tried to configure task & debugger for ubuntu. Finally It helps me lot. Thank you so much.
@bharathishavakkar4526
@bharathishavakkar4526 3 жыл бұрын
Actually I was frustrated for a whole day, but this tutorial saved me from having hard time! Thanks a lot! 🕊️
@ryoma8402
@ryoma8402 2 жыл бұрын
Just a quick observation. If you want to compile and debug C++ files, in the "tasks.json" file, in line 7, the command should be "/usr/bin/g++" instead of "/usr/bin/gcc".
@yurifontoura2444
@yurifontoura2444 2 жыл бұрын
Thank you. I waste some time to discover that!
@Miguel-mv5yc
@Miguel-mv5yc Жыл бұрын
so if I'm building both C and C++ code I need to keep constantly changing this?
@alifooo.
@alifooo. Ай бұрын
Yuu saved my life dude
@SillyFizy
@SillyFizy 3 жыл бұрын
setting up vs code never been so easy thanks to you
@rishiniranjan1746
@rishiniranjan1746 3 жыл бұрын
u really covered all of my doubts in this one video.......thank u so much.........appriciated
@mgkillergamer
@mgkillergamer 3 жыл бұрын
Respect.....now I know that I am not the only one that creates a development folder with all my projects in there 👍
@orbor575
@orbor575 2 жыл бұрын
Thank you so much this worked on my VSS on Ubuntu 22.04 !
@epangelakakussi9980
@epangelakakussi9980 3 жыл бұрын
Thank you so much ,it worked perfectly well on my kubuntu 20.04 LTS.
@AshrafSada
@AshrafSada Ай бұрын
Thank you for a nice presentation, I want to add that sometimes you need to install GDB as it is not installed to default location on Linux, /usr/bin/gdb
@igorbelyy8412
@igorbelyy8412 2 жыл бұрын
#include has to be added in example.c . thanks a lot for clear explanation.
@Neldurion
@Neldurion 3 жыл бұрын
This tutorial is amazing, you convinced me doing this configuration instead of using code runner !
@lx6381
@lx6381 2 жыл бұрын
in germany we call people like you "Ehrenmann".
@NazoFruciak
@NazoFruciak 3 жыл бұрын
Very good tutorial. It was way easier than setting this up on windows.
@frankyin8509
@frankyin8509 2 жыл бұрын
This rescues my leetcode competition. Hats off
@blissstorm77
@blissstorm77 3 жыл бұрын
Mulțumesc pentru explicație! Sunteți tari!
@gambursuluk
@gambursuluk 2 жыл бұрын
Allah senden razı olsun arkadaşım. Çok işime yaradı. Thank you man.
@noweare1
@noweare1 3 жыл бұрын
Thank you that was very helpful. One thing i found out though, the memory part of vscode is not implemented in debugger. I use that to see how variables are stored ie structs, arrays etc, very helpful for understand how information is stored. So I continue to use code-blocks so that I can look at memory contents.
@kianemami9090
@kianemami9090 2 жыл бұрын
It Was Awesome , extremely informative and easy to understand , thank you
@tanmaykumar9277
@tanmaykumar9277 3 жыл бұрын
Thanks a lot, this video was extremely accurate and you saved so many of my hours.
@danbesu
@danbesu 3 жыл бұрын
Thank you for this tutorial! Extremely helpful and well explained!
@honeybadger781
@honeybadger781 3 жыл бұрын
I use VSCode for C on Linux but I use vscode-clangd. Which is just a language server no debug or compile. I created a simple C program to execute the first line of the current file after the last // // LIVE // sudo gcc -Wall -s -o /usr/local/bin/notify notify.c notification.c $(pkg-config --cflags --libs libnotify) // TEST // gcc -Wall -o notify notify.c notification.c $(pkg-config --cflags --libs libnotify) && ./notify I have a single global task setup in VSCode mapped to F10 that passes the full path of the current file. Works on any type of file and is available in every VSCode workspace without any setting up task.json and launch.json. So much easier and quicker for small projects.
@CodeVault
@CodeVault 3 жыл бұрын
Really nice solution! It's always a hassle to set up all both tasks.json and launch.json every time I create a small project. I use the same environment for all the videos so I don't have to deal with that. Another solution would be to make a softlink to an external .vscode folder.
@sumiharsola6043
@sumiharsola6043 3 жыл бұрын
Bro are you on social site
@CodeVault
@CodeVault 3 жыл бұрын
Which social site?
@maxberlinski3916
@maxberlinski3916 2 жыл бұрын
very helpful but i have a problem the #include i marked as red theres an error on building: /home/{name}/Desktop/C++/main.cpp:1:10: fatal error: studio.h: No such file or directory 1 | #include
@maxberlinski3916
@maxberlinski3916 2 жыл бұрын
nevermind
@khayryazzez
@khayryazzez 3 жыл бұрын
i have an error Could not load source './libio/iofread.c': 'SourceRequest' not supported..
@CodeVault
@CodeVault 3 жыл бұрын
Hmm, seems like an issue with one of the extensions. Look here for a solution: github.com/microsoft/vscode-cpptools/issues/3831
@ahmedrodriguez7358
@ahmedrodriguez7358 3 жыл бұрын
You are the best teacher ever! Big thanks
@shayansec
@shayansec 3 жыл бұрын
That's what I'm looking for...thanks man! It helps a lot.
@r4ravi1
@r4ravi1 2 жыл бұрын
Thank you VERY MUCH 🙏 it helped. At last I got perfect channel 😀
@bsgamer5069
@bsgamer5069 3 жыл бұрын
I am using msvc compiler with vs code. It was very hectic using msvc compiler for the first time. 🙂
@CamaradaArdi
@CamaradaArdi 3 жыл бұрын
amazing, this is the best tutorial out there by far
@negmaa
@negmaa 3 жыл бұрын
Could you explain how to use make file with vscode?
@CodeVault
@CodeVault 3 жыл бұрын
I'll look into it
@vladanlazarevic3058
@vladanlazarevic3058 2 жыл бұрын
launch: program "enter program name, for example /home/vlado/Desktop/projekti_C/a.out" does not exist what is problem?
@CodeVault
@CodeVault 2 жыл бұрын
Probably you have an issue at compilation or the executable is not named a.out
@rohansahu6047
@rohansahu6047 10 ай бұрын
In my vs code...Bash: syntax error near unexpected token '&& is showing whenever I try to run a long code..what to do?
@CodeVault
@CodeVault 10 ай бұрын
Hmm... maybe your launch config is wrong since the error is coming from bash
@Sneaadler
@Sneaadler 3 жыл бұрын
You always do everything right, thank you!
@jorgediazlandaeta3283
@jorgediazlandaeta3283 2 жыл бұрын
Thanks for this good video, do you have information about import c++ eclipse project to visual studio code? C++ has two types of compilation one for release and one for debug?
@CodeVault
@CodeVault 2 жыл бұрын
I haven't used Eclipse. I assume you could just copy most of the source code and compile everything yourself like I showed in the video
@christopherlegarda5164
@christopherlegarda5164 3 жыл бұрын
I used to run the program through the editor but for some reason is not working. I can manually compile it but I am trying to go back to how it was. Do you have any idea why I can not compile it through the editor? All the setting you had provided is the same on my end. I do not know what to do.
@CodeVault
@CodeVault 3 жыл бұрын
Does it give you an error? Or a warning?
@frankzheng5221
@frankzheng5221 2 жыл бұрын
nice small tutorial, perfect to build my helloworld.
@davidlawal7669
@davidlawal7669 3 жыл бұрын
In task.json i have "cwd": "${fileDirname}" but yours says "${workspacefolder} can you tell please explain why and how i can change that ?
@CodeVault
@CodeVault 3 жыл бұрын
You can check what these all mean: code.visualstudio.com/docs/editor/variables-reference Usually you want to use workspaces where possible, so I think you can simply change from fileDirname to workspaceFolder and you'll be fine
@y_red_gold_a4280
@y_red_gold_a4280 2 жыл бұрын
Thank you so so much. Launch works using F5 however, I wonder why I get an error if I launch from the top-right play button (Run C/C++ File or Debug C/C++ FIle)? An error pops up indicating the file does not exist. Thank you :)
@CodeVault
@CodeVault 2 жыл бұрын
Hmm... Make sure you select from the dropdown the correct lauch.json task. You might have it set to something else
@erikjensen6328
@erikjensen6328 2 жыл бұрын
Thank you for a great video. Everything works as shown. I would like to use the commands cin and cout available in "iostream". How do I add a setup, so it can find the include files with writing "" for every include file I would like to use?
@CodeVault
@CodeVault 2 жыл бұрын
iostream is part of the C++ standard library. You need to use g++ instead of gcc and cpp files instead of c files.
@Elena-fc3hp
@Elena-fc3hp 2 жыл бұрын
Thank you so much for this tutorial!
@animeshkumarsinha5954
@animeshkumarsinha5954 3 жыл бұрын
Awesome video 👍
@alessandrocinque4542
@alessandrocinque4542 3 жыл бұрын
You are a Holy Man! I just have a question, I am using the opencv4 library and every time I need to compile my code I have to put " g++ -o main main.cpp `pkg-config opencv4 --cflags --libs` " in the terminal. How should I configure the .json file to obtain the same result by pressing F5 into VSCode? Is the thing that you did with "example" working also when you #include other local files? like an inherited class and so on
@CodeVault
@CodeVault 3 жыл бұрын
Yes, I think in this case you should use make or cmake to compile your program. And it's basically the same as in the video except you change the commands to cmake. Just make sure you are compiling with the debug flag enabled, otherwise you can't debug your code
@-kp3
@-kp3 2 жыл бұрын
I am getting a "launch program {fileDirname}/list does not exist" error, any fix?
@CodeVault
@CodeVault 2 жыл бұрын
Can you send me your launch.json file?
@mmkvhornet7522
@mmkvhornet7522 2 жыл бұрын
hi sir i did repeat the same steps like you but when pressing f5 it asks to specify the Midebugger path option please help me
@CodeVault
@CodeVault 2 жыл бұрын
I think you need to add the key miDebuggerPath to the launch configuration. The value should be the path to do gdb executable. If you don't have gdb, you should install it through your package manager
@mmkvhornet7522
@mmkvhornet7522 2 жыл бұрын
@@CodeVault thank you sir it turned out that i have no gdb installed so i did and now it's working !! 🤠
@prithivirajchavan1928
@prithivirajchavan1928 3 жыл бұрын
Once i hit run build task, it still asks me for the build option and when i click on it, the executable binary is being created in the root folder and not inside bin even though i mentioned it to build it there in tasks.json. I ignored it at first and then continued with the tutorial till launch.json and i hit f5 i get a message saying "cannot find ....bin/main" even though i've set it in tasks.json. I tried entirely removing the bin folder part just to see if it works since the binary is being made in the root folder but launch.json is still looking in bin instead of root folder even after changing the path. What should i do now?
@prithivirajchavan1928
@prithivirajchavan1928 3 жыл бұрын
Nvm, i just tried it with a fresh install of vscode and it worked. Don't know why it didnt work the first time around.
@arielcairoli2473
@arielcairoli2473 3 жыл бұрын
Hi, I have a problem while debugging, a message come out saying "Terminal will be reused by tasks" I can´t see the program printing the "Hello World" running the program steps by steps. I am running on Raspberry Pi 4
@CodeVault
@CodeVault 3 жыл бұрын
Hmm, make sure the program compiled without errors. Also check for extra terminals opened on vscode
@johannesschneider4174
@johannesschneider4174 3 жыл бұрын
Thanks a lot. It worked for me!
@stefandimitrov4674
@stefandimitrov4674 3 жыл бұрын
Hi, I have a question. I want to create a game with OpenGl and I need to install some external libraries. However I have no idea how to tell VSCode where they are located. For example I get this error: "GLFW/glfw3.h: No such file or directory". How can I link my libraries to my project? I have them saved in a lib folder - lib/GLFW/inlcude
@CodeVault
@CodeVault 3 жыл бұрын
There is the c_cpp_properties.json file in which you can add additional include folders. Add that folder there. That'd be the first step. Then, in the gcc command, make sure you have -lglew (or whatever library you need to link to when compiling)
@romandamico5436
@romandamico5436 3 жыл бұрын
And if the folder bin is not present how can I tell to tasks.json or to launch.json to create it before to compile and execute the program? should I use preLaunchTask in the same way that you used to compile the program?
@CodeVault
@CodeVault 3 жыл бұрын
I think you can simply prefix the build command with "mkdir bin;", the semicolon there is important as, if the folder exists it will continue executing
@romandamico5436
@romandamico5436 3 жыл бұрын
@@CodeVault i tried to do that but I get an error 127 command not found
@CodeVault
@CodeVault 3 жыл бұрын
Hmm, you can make another task that has mkdir as it's command parameter and specify it as a preLaunchTask in launch.json
@alexlandherr
@alexlandherr 2 жыл бұрын
Do you have a tutorial on how to install 3rd party libraries for this setup?
@CodeVault
@CodeVault 2 жыл бұрын
No. But I will look into it in the future
@ipotato9564
@ipotato9564 3 жыл бұрын
How do I give the file parameters before(or after) the launching ? If I want to compile and run it freehand to give the function parameters from the terminal now, it returns the error "Segmentation fault (core dumped)" pleeeease help
@CodeVault
@CodeVault 3 жыл бұрын
There must be some mistake in your code
@doggo531
@doggo531 16 күн бұрын
thank you so much for the helpful video
@cb2578
@cb2578 2 жыл бұрын
Hi, is it important for the type to be "shell" instead of "cppbuild" (because when I click the same thing you did, my type is cppbuild instead of shell, and my "cwd" are {fileDirname} instead of ${workspaceFolder} ) I tried both but got "Cannot build and debug because the active file is not a C or C++ source file." instead :( what should I do? thank you :)
@CodeVault
@CodeVault 2 жыл бұрын
I'm assuming the cppbuild type is used by the C/C++ extension. Make sure the tasks.json has the same contents as here: code-vault.net/lesson/4wy66ezt7u:1610303902122
@MKSundaram
@MKSundaram 3 жыл бұрын
I am trying to debug my code, but I am stumped by errors: 1) launch.json: file format not recognized; treating as linker script 2) launch.json:1: syntax error collect2: error: ld returned 1 exit status The terminal process failed to launch (exit code: -1). Could you please help me to resolve this? Thanks.
@CodeVault
@CodeVault 3 жыл бұрын
Can you send me the launch.json file? I think something's wrong there
@8_max723
@8_max723 3 жыл бұрын
just the video I needed at this point of time thanks a lot!!
@iglibegolli9749
@iglibegolli9749 3 жыл бұрын
hi, I have a problem with the launch.json and when I change the Programm, it shows "unable to start debugging. Launch options string provided by the project system is invalid. Unable to determine path to debugger.Please specify the MItDebuggerpath option". I hope you can help me and btw I use kali linux in a virtuelbox and maybe thats the problem
@CodeVault
@CodeVault 3 жыл бұрын
Just set the property: "miDebuggerPath": "", You can find it using the command "whereis gdb"
@zenec_
@zenec_ 3 жыл бұрын
doesn't work.. prints out the default launch.json parameters when trying to save the launch.json file., and when copying your code, without trying to save the launch json it says The preLaunchTask 'C/C++: gcc build active file' terminated with exit code 1 : Shows Errors or Abort or Debug anyway...
@CodeVault
@CodeVault 3 жыл бұрын
Does it show any compilation errors? That could be the cause
@Aaronb2245
@Aaronb2245 3 жыл бұрын
Great video, but seems like a pain to do that for each workspace. I think I may just use the editor, and use a makefile for build and gdb for debugging. Thanks for sharing!
@CodeVault
@CodeVault 3 жыл бұрын
To be honest, it never was a pain to do that. I always just copy the files from the .vscode folder to the new workspace and that's it
@marcus-school
@marcus-school 3 жыл бұрын
Thank you very much! I can finally write programs)
@The_Navigator07
@The_Navigator07 3 жыл бұрын
thank you my brother
@quthaproducer4405
@quthaproducer4405 3 жыл бұрын
I get an error when doing the example.c part. I was wondering if I could contact you to get help with this personally?
@CodeVault
@CodeVault 3 жыл бұрын
You can ask here, I try to reply to all the comments
@crazy9780
@crazy9780 3 жыл бұрын
Thank you, Does it support user input to?
@CodeVault
@CodeVault 3 жыл бұрын
Yea
@crazy9780
@crazy9780 3 жыл бұрын
@@CodeVault I have a problem, the other c file I try to compile still don't follow the settings. How to solve this?
@CodeVault
@CodeVault 3 жыл бұрын
What settings do you mean?
@crazy9780
@crazy9780 3 жыл бұрын
@@CodeVault nevermind bro I solved it. Thank you very great tutorial. Please make more content like this
@virendrakumarmishra876
@virendrakumarmishra876 3 жыл бұрын
How do I directly open output in my Linux terminal by just click as you open in your videos?
@CodeVault
@CodeVault 3 жыл бұрын
I'm not sure I understand the question. You mean with CTRL + ` by opening the integrated terminal?
@juandercontreras1102
@juandercontreras1102 3 жыл бұрын
Great, but could you explain how to setup c in linux but for pico/stdlib.h, because i am getting error with that library and i dont know why.
@CodeVault
@CodeVault 3 жыл бұрын
Hmm, I'm not familiar with that. What error are you getting?
@onlinecreations7781
@onlinecreations7781 2 жыл бұрын
not working on blackarch linux..plz make a video for code oss full setup and installition process for blackarch linux
@CodeVault
@CodeVault 2 жыл бұрын
I used Code OSS for quite some time on Linux. It should work the same... What's the issue you're getting?
@sumiharsola6043
@sumiharsola6043 3 жыл бұрын
Hlo sir my For statement is not running so please help me 🙏🙏🙏🙏 In programming in c
@CodeVault
@CodeVault 3 жыл бұрын
Go to discord.code-vault.net and ask there
@aketisubbu
@aketisubbu 3 жыл бұрын
could you please explain How to run Posix threads programs using visual studio code
@CodeVault
@CodeVault 3 жыл бұрын
Add the -pthread parameter to gcc (to the "args" list in tasks.json), this works only on Linux
@hamzekamel
@hamzekamel 2 ай бұрын
Thanks you helped me alot ❤
@Vuhdu
@Vuhdu Жыл бұрын
/usr/bin/gcc : The term '/usr/bin/gcc' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
@CodeVault
@CodeVault Жыл бұрын
Make sure you are on Linux. Seems like you are trying to execute gcc on Windows
@017_benjoysonr2
@017_benjoysonr2 3 жыл бұрын
Damn im really glad i found this video Really helpful!!
@RexisLive
@RexisLive 3 жыл бұрын
I'm still facing issues in making programs in like arrays,linked list etc. Can you make a seperate video for all that?
@CodeVault
@CodeVault 3 жыл бұрын
There are videos for linked lists and arrays and a lot more. I put them in playlists although not all of the videos are in a particular order (the linked list playlist is tho!): kzbin.info/door/6qj_bPq6tQ6hLwOBpBQ42Qplaylists
@RexisLive
@RexisLive 3 жыл бұрын
@@CodeVault Thanks! Waiting for your upcoming videos
@blackdarkmido
@blackdarkmido 3 жыл бұрын
Thank you very much, you explain very well
@MKSundaram
@MKSundaram 3 жыл бұрын
How do I call a function from main to a function which is in another file? I am using VS code
@CodeVault
@CodeVault 3 жыл бұрын
Usually you can simply create a .h and a .c file for the function. In the .h you put just the signature of the function and in the .c file you put the implementation too. You include the .h file in the main .c program and you add the .c file in the gcc compilation command.
@chibuikeanukam2101
@chibuikeanukam2101 3 жыл бұрын
Thank you for the video! It really helps! My only problem is that when I press F5 to complie my main.c code, I get a "MIDebuggerPath" error. How do you fix this?
@CodeVault
@CodeVault 3 жыл бұрын
Either missing gdb or the miDebuggerPath is pointing to the wrong executable. Run the command "whereis gdb" and paste that there. Here is some more info stackoverflow.com/questions/56344186/unable-to-start-debugging-the-value-of-midebuggerpath-is-invalid
@chibuikeanukam2101
@chibuikeanukam2101 2 жыл бұрын
@@CodeVault Thank you very much! 😀
@OMan96_09
@OMan96_09 3 жыл бұрын
Hello perfect tutorial. Please can you explain how to fixe this errror ? #include errors detected. Please update your includePath. Squiggles are disabled for this translation unit
@CodeVault
@CodeVault 3 жыл бұрын
There should be a c_cpp_properties.json file, there you have to make sure that your path to the compiler is correct and that in includePath you have all the additional files (if any). Other option is to go to settings and set the compiler path from there.
@OMan96_09
@OMan96_09 3 жыл бұрын
@@CodeVault I tried but it still doesn't work. Is there an email address where I can send you pictures? I've been on it for days and still can't do it.
@CodeVault
@CodeVault 3 жыл бұрын
You can join the discord server, that's where most people come for help: discord.code-vault.net
@davidlawal7669
@davidlawal7669 3 жыл бұрын
Is there something i should do or change if i am using c++ instead of c ?
@CodeVault
@CodeVault 3 жыл бұрын
Use g++ instead of gcc Otherwise, you should be fine
@yevheniyk5358
@yevheniyk5358 2 жыл бұрын
Is there a way I can cross compile from linux in VS ?
@CodeVault
@CodeVault 2 жыл бұрын
Cross compilation should work regardless of the IDE used, you can simply add more arguments for gcc in the args list
@GerrixAndroid
@GerrixAndroid 3 жыл бұрын
On Raspberry Pi I had to choose g++ for compiler otherwise I got txt file instead of executable.
@CodeVault
@CodeVault 3 жыл бұрын
That's odd... g++ can compile C files although it's recommended you use gcc
@mdaasil2329
@mdaasil2329 3 жыл бұрын
How to get rid of [1] + Done in terminal?
@CodeVault
@CodeVault 3 жыл бұрын
I tried to, but haven't found a solution to that
@mdaasil2329
@mdaasil2329 3 жыл бұрын
@@CodeVault 😞ok bro
@deinemama6303
@deinemama6303 3 жыл бұрын
thank you so much! This helps a lot
@arslanrozyjumayev8484
@arslanrozyjumayev8484 2 жыл бұрын
Thank you !!!! very good content!!!
@nicolasbourbaki8896
@nicolasbourbaki8896 2 жыл бұрын
Absolutely briliant!
@klodi2269
@klodi2269 2 жыл бұрын
Hello there , I did all your steps in your video and although it works perfectly fine for c , when I go and make a cpp file and compile it , it shows me the same error like yours in the video. Do you got any tips on how to solve this ? Thanks in advance
@CodeVault
@CodeVault 2 жыл бұрын
Make sure you use g++ instead of gcc for cpp files. What error are you getting exactly?
@klodi2269
@klodi2269 2 жыл бұрын
@@CodeVault I am getting the error launch program does not exist , is there a way to send u some screenshots ?
@klodi2269
@klodi2269 2 жыл бұрын
@@CodeVault is it possible that the provlem is having c and cpp files in one folder ? I think i should have a separate folder for c ( with its task.json , launch.json etc ) and a separate one for c++( with the corresponding .jsons)
@klodi2269
@klodi2269 2 жыл бұрын
I finally fixed my problem , it was that the c and cpp files where in the same folder and the cpp couldn't run cause it had no json files for cpp compiling and debugging . Thanks anyways
@anton_98
@anton_98 3 жыл бұрын
Exceptionally! Thanks a lot!
How do I run and compile my C code?
14:20
CodeVault
Рет қаралды 9 М.
Install and Run C++ in Visual Studio Code (Linux)
13:43
Brian Fraser
Рет қаралды 198 М.
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 1,4 МЛН
How a Microcontroller starts
28:49
Artful Bytes
Рет қаралды 61 М.
How the C++ Linker Works
15:52
The Cherno
Рет қаралды 646 М.
Let's Create a Compiler (Pt.1)
1:11:03
Pixeled
Рет қаралды 573 М.
Measure execution time in C (for Linux and Windows)
23:04
CodeVault
Рет қаралды 11 М.
Linux File System/Structure Explained!
15:59
DorianDotSlash
Рет қаралды 4,2 МЛН
C++ Debugger for complete beginners
8:35
Low Level Game Dev
Рет қаралды 12 М.
Tmux has forever changed the way I write code.
13:30
Dreams of Code
Рет қаралды 1 МЛН
Comparing C to machine language
10:02
Ben Eater
Рет қаралды 5 МЛН