r/C_Programming • u/Popular-Psychology40 • Jun 29 '26
Question best platform and compiler?
Hey im looking to get into C programming, i have never programmed in my life (unless scratch counts haha) and i dont know if i should use linux mac or windows, whatever is more dummy-friendly and has an error checker. i will be using as a guide the 2nd edition of C programming: a modern approach by K.N. king
8
Upvotes
12
u/ClassicCarFanatic12 Jun 29 '26
My recommendation would be to use the clang compiler with a major popular Linux distro like Ubuntu. I personally have found clang’s error messages to be more helpful than gcc, especially when starting out and learning.
My other recommendation is to resist the sirens call of AI, at least when first starting something. Use it to get clarification on what you’re struggling with but don’t let it do any of the work for you.
4
u/dychmygol Jun 29 '26
If you're on a Linux or macOS machine its quite likely you already have a C compiler. Most common IDEs have support for syntax highlighting, debugging, and profiling your code. Choose the IDE that suits you, and you'll be fine. The King book is very good.
4
u/ForgedIronMadeIt Jun 29 '26
Just use whatever system you already have. If you have multiple, then use whichever system you are most proficient with. I personally always used Windows and Microsoft Visual Studio and that development environment is pretty darn convenient. If you don't want to use a full IDE, then every system is basically the same -- code goes into source and header files and then you invoke the compiler.
9
u/Tricky-Dust-6724 Jun 29 '26 edited Jun 29 '26
Unix like systems (Linux, Mac) are usually much smoother than windows, it’s C’s natural habitat.
gcc as a compiler should be good and probably already installed on your system (talking about Linux and Mac)
Edit: look into WSL2 as well if you have windows machine
3
u/RainbowCrane Jun 29 '26
I’d suggest something slightly different from others: use whatever host system you’d prefer for your daily activities (gaming, document editing, web browsing, etc). Specifically for development, though, use a Linux virtual machine on that host system.
Using a VM isolates your development environment and makes it extremely portable. It’s way easier to control the configuration of a VM and limit your exposure to problems caused by some new driver or system tool that you’ve installed on your daily use machine.
I’d recommend the free version of Oracle VirtualBox (Windows, Linux, Mac) or VMware Workstation Pro (Windows, Linux) or Fusion (Mac). Windows Hypervisor also exists but it only works on Windows hosts, so it’s less useful if you decide you want to deploy your development environment to the cloud.
Both VMWare and VirtualBox have preconfigured small VMs that are suitable for command line C application development and C web applications. You’ll have a long way to go before you outgrow a pretty minimal VM, and if you really screw something up the worst thing that could happen is that you delete the VM and rebuild it from an image.
2
u/Direct_Chemistry_179 Jun 29 '26
If you choose windows I would suggest w64devkit. It lets you emulate Linux dev environment on Windows. This is the simplest way.
Conversely visual studio has a really good debugger. That itself makes it really useful, but it’s not super beginner friendly.
2
u/sens- Jun 29 '26
Yes, scratch counts. Why wouldn't it?
2
u/kun1z Jun 29 '26 edited Jun 30 '26
For the past decade it really doesn't matter anymore so use the OS you're the most familiar with. The "best" way to go about learning is to not also pack on top of learning C with also having to learn a new OS or tool. If you have no real experience then most people are going to suggest (alphabetical order):
And using GCC.
On Windows CYGWIN is amazing and basically smashes the Windows command line tools into the POSIX command line tools, which I really enjoy. For example on Windows I can type:
I can mix & match all the Windows and POSIX tools and pipe this into that and back again, it's quite handy as both a Windows and Linux developer.
GCC and Clang can be installed on anything quite easily. I personally prefer 95% of my developing on Windows using CYGWIN and GCC, and using GUI Windows debuggers like x64dbg.com to hunt down bugs.
But in the end, just use what you're already familiar with.
2
u/v_maria Jun 29 '26
both works. i think windows is really bad but its a choice.
on windows use visual studio IDE (not vscode) and on linux you can use clion IDE
if you want to use a more "downstripped" environment, linux is the go to. it's harder to setup in windows. but you probably want to hold off on this and just get a feeling for programming in an IDE
2
u/Negative_Effort_2642 Jun 29 '26
Linux with clang - bcs of the tooling but u can use gcc too
2
u/duane11583 Jun 29 '26
if you are familiar with and have a windows machine the “visual studio community edition” is the best solution. this is not ”visual studio code” that is just the editor no compiler.
on a mac it would be xcode
if you want to learn more of the entire process that goes with the c language then linux and makefiles are the choice.
yes there is the gcc for windows known as minggw but imho it is not noobie friendly.
and your goal is to learn the c language so visual studio community edition is the right choice on windows
1
u/Albedo101 Jun 29 '26
Linux, preferably a distro with KDE desktop environment and Kate text editor. GCC as a compiler, GDB in "TUI mode" as the debugger. GNU Make as the build system.
Kate is already set up out of the box to act as a programmer's editor, and GCC/GDB is the classic combo. This way, you can use Kate as a lightweight IDE, or just do everything from the command line, at the same time, your choice. When you start growing, Linux will have additional tools easily available, like profilers (gprof, Valgrind), or different compilers (clang), different build systems (CMake...) or even full IDEs like KDevelop, QtCreator, CLion.
You won't find such diversity in choice of tools on other OSes.
1
u/AnonymityPower Jun 30 '26
Windows - use WSL
Linux - yes
Mac - if you have one, I guess?
1
u/realestLink Jul 02 '26
I'd recommend clang or gcc on Linux. That's pretty much exclusively what I use and I think it's also the most accessible/flexible
0
u/ModeFinal6821 Jun 29 '26
Dev-C++ comes highly rated for beginners. Free and open source.
https://www.dev-cpp.com/
4
u/[deleted] Jun 29 '26
[removed] — view removed comment