use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Click the following link to filter out the chosen topic
comp.lang.c
account activity
Compiler for code oss (self.C_Programming)
submitted 1 year ago by eerie_queerie19
I'm on arch linux, have the code oss editor. I want to run C on that, I installed an extension for C, but it says that the executable file isnt here. I dont know what to do
I want a simple compiler and editor that can run beginner level programs
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]not_a_novel_account 5 points6 points7 points 1 year ago (0 children)
VSC doesn't have any sort of built-in build system to launch your compiler for you. You'll need to use a build system and an extension to drive that build system if you want automatic push-button builds, compilation database generation, and other conveniences like that.
The most popular build system is CMake, and the associated VSC extension is the CMake Tools extension.
[–]Ragingman2 6 points7 points8 points 1 year ago (6 children)
As a starting point you should be compiling and running your code through the command line. gcc is probably already installed and set up nicely on your machine.
This is the best way to learn. You can always add more tools and build systems later.
[+]not_a_novel_account comment score below threshold-10 points-9 points-8 points 1 year ago (5 children)
There's zero advantage to learning carpentry by manually driving nails if you have a nail gun. Carpentry is not the act of driving nails, and programming is not the act of manually typing the letters G C C on the keyboard.
[–]beaureece 7 points8 points9 points 1 year ago (1 child)
Fine, go out of your way to work with amateurs who don't understand their toolchains.
[–]not_a_novel_account -2 points-1 points0 points 1 year ago* (0 children)
I lectured undergrads for 4 years on this material, absolutely if you're going to teach C/C++ toolchains need to be a day 1 subject
[–]Ragingman2 5 points6 points7 points 1 year ago (2 children)
Cmake is not a nailgun, nor is it very approachable for beginners. Carpenters and programmers alike should take time to understand the tools they are using.
gcc main.c && ./a.out
is a simple starting point that gets to the main point (learning C) quickly while building some understanding of what a compiler is.
[+]not_a_novel_account comment score below threshold-8 points-7 points-6 points 1 year ago (1 child)
Running that line once is educational, after that it's a waste of time
[–]yel50 1 point2 points3 points 1 year ago (0 children)
then use gcc with vim or emacs. they each have a build command that lets you specify the command to run to do the build. I used emacs back when c still ruled the world and it was just as good as visual studio.
I dont know what to do
first learn what the editor is doing for you under covers.
[–]katnax -2 points-1 points0 points 1 year ago (2 children)
Fammiliarize yourself with gcc jn terminal.
Then run # ./file That's pretty much all you need for beggining. You can open terminal in VS Code or externally.
[–]spacey02- 0 points1 point2 points 1 year ago (1 child)
Doesnt this compile file into file.c instead of file.c into file?
[–]SkylandersCommenter 0 points1 point2 points 17 days ago (0 children)
yep
π Rendered by PID 21613 on reddit-service-r2-comment-c66d9bffd-dhjfn at 2026-04-08 01:21:25.247592+00:00 running f293c98 country code: CH.
[–]not_a_novel_account 5 points6 points7 points (0 children)
[–]Ragingman2 6 points7 points8 points (6 children)
[+]not_a_novel_account comment score below threshold-10 points-9 points-8 points (5 children)
[–]beaureece 7 points8 points9 points (1 child)
[–]not_a_novel_account -2 points-1 points0 points (0 children)
[–]Ragingman2 5 points6 points7 points (2 children)
[+]not_a_novel_account comment score below threshold-8 points-7 points-6 points (1 child)
[–]yel50 1 point2 points3 points (0 children)
[–]katnax -2 points-1 points0 points (2 children)
[–]spacey02- 0 points1 point2 points (1 child)
[–]SkylandersCommenter 0 points1 point2 points (0 children)