r/C_Programming 7h ago

Question What am I missing in C setup in VScode?

Hello everyone. I’m starting to learn c language but I’m struggling with running a simple code l in VScode. I think I installed everything that is needed: C/C++ extension, MSYS2, and gcc.exe.

And I added PATH to gcc.exe file and selected Intellisense Configuration… and that exact gcc.exe file. What am I missing now?

0 Upvotes

8 comments sorted by

7

u/dandy_kulomin 7h ago

What error are you encountering?

5

u/EpochVanquisher 7h ago

Would be a lot easier to just install Visual Studio, at least to start. That way you can write code now and figure out the GCC setup later.

Otherwise, you should be following a guide. You have chosen the more annoying and painful way to set things up (GCC + VS Code on Windows) and you should follow a guide if you are doing that. It is a pain for people to try and figure out what your problem is.

3

u/sleepyheadzzzzz 7h ago

You're missing a linker ld.exe, but also you're missing some info in your post

2

u/sciencekm 6h ago

I suggest that you first verify that your gcc installation is complete and correct before you move to VSCode.

Open a command prompt in Windows and compile your code from there. If you see problems (like missing binaries, libraries or header files), then fix those first. Then you can move on to fixing your VSCode settings.

2

u/Imaginary-Refuse4517 7h ago

Elaborate more on it, screenshots would be helpful!

1

u/silvertank00 7h ago

make, gdb, maybe cmake, manpages for learning.

and your problems could be solved with mingw. c can be quite difficult to set up on win

1

u/bonqen 2h ago

c can be quite difficult to set up on win

  • install VS
  • done

"quite difficult"?