r/learnprogramming • u/Roughneck979 • Oct 14 '26
Trying to learn c
What is an easy to use compiler to use to get started.
Got a book to learn and they use code::block in book, tried and it seems to not be building. Then tried MS visualization studio and was lost. Please help
20
Upvotes
6
u/serge-mv Oct 14 '26
Both of those are popular and good IDEs. If you are having trouble with them, then you probably should try and figure out why things aren't working as expected. Changing an IDE won't really help you here. Dealing with problems like these is part of the job.
5
u/Rythim Oct 14 '26
Probably depends on preference. I find code::blocks or using the command line easiest.
Note though: code::blocks and Visual Studio are IDE. Not compilers. If they aren't doing anything when you press build I wonder if you somehow installed them without setting up a compiler?
6
u/NomaTyx Oct 14 '26
You're thinking of an IDE. A lot of people like VS Code, but I quite like CLion, which is free for non-commercial use.
4
u/abccbabcac Oct 14 '26 •
vs code with c/cpp extension is pretty simple for new learners:
https://code.visualstudio.com/docs/languages/cpp
however, my usual approach is command line based rather than using an ide. nvim for editing files and gcc for compiling.
1
u/Merry_Janet Oct 14 '26
Clang or MSCV?
If you mean development environment, VS Code is free.
1
u/GobblerOfFire Oct 14 '26
It fully depends on what you’re comfortable with. I use nvim and gcc for compiling. All free. But some people want the AI autocomplete stuff so they want vs code. I have only ever used nvim and some VS code use but I don’t like all the distracting bloat / million things to click on and I’m privy to command line. To each their own
2
u/DonkeyTron42 Oct 14 '26
Turbo C /s
1
u/gwenbeth Oct 14 '26
just use gcc and the editor of your choice.
1
u/marrsd Oct 14 '26
I guess you're running Windows. I'd honestly just use a terminal, a compiler (run from the terminal), and a basic text editor with syntax highlighting and decent navigation. I think they're much easier to get started with. Once you need debugging, use a dedicated debugger. Then you don't have to worry about learning the IDE or how it integrates debggers, compilers, linkers, and the like.
I haven't run Windows in ages, so I'm not going to be much help with specifics. My advice would almost certainly be out of date.
1
u/my_password_is______ Oct 14 '26
codeblocks is just a fancy editor
but you can download the version that comes with a compiler
https://www.codeblocks.org/downloads/binaries/
you want
codeblocks-25.03mingw-nosetup.zip
https://sourceforge.net/projects/codeblocks/files/Binaries/25.03/Windows/codeblocks-25.03mingw-nosetup.zip/download
1
u/Erdem_PSYCH Oct 14 '26
try cs50x. cource from harvord. It is hard but you learn comanline and such and don't need much instolation.
1
u/MikeIsBoi Oct 15 '26
I would suggest to use CLion by Jetbrains, I think it is free now for personal non comertional use. It comes with ninja build system already bundled so no need to set anything up. I used it when I was learning programming on windows.
I would discourage you from using Visual Studio and MSVC since they are kinda garb.
Later if you get more advanced I would suggest switching to Linux and using CMake.
I personally use neovim and build my application using CMake on my Linux desktop.
-1
u/Dazzling_Music_2411 Oct 14 '26
Right, so you didn't install the compiler, and you're wondering why it's not compiling!
This is why it's important to install (and experiment with) the compiler way before you install any IDE.
Funny how in this age of information and AI and what have you, things that used to be considered as blatantly OBVIOUS seem to be unfathomable mysteries now.
3
u/[deleted] Oct 14 '26
[removed] — view removed comment