Editors and compilers
and run a C program
If you want to make executable from C source code, there are two ways to do it:
The complicated variant
Known editors:
Windows Notepad+++
vi and Emacs (Linux/Unix)
TextMate (macOS)
The all-in-one variant
Of course, a software developer will usually work with a development environment. But in order to learn what's really going on in programming and without distraction, the complicated version is usually recommended first.
I recommend this C11 standard compiler:
gcc aus der GNU Compiler Collection (Linux)
MinGW (Windows)
PellesC (Windows)
Clang LLVM (macOS)
1. Develop
#include
int main() {
printf("Hello World\n");
return 0;
}
2. Compile
Helloworld.c becomes helloworld.exe, an executable file.
3. Start
By entering open helloworld, the program is started. If no programming errors have been made, the program will work as expected and will output "Hello World".
So you see, it's not that hard. As with the Day 1 article already said; the basic principle is always: input - processing - output.
Thank you for reading!
-Faxe
-----German / Deutsch-----
Entwicklerwerkzeuge
Ein C Programm kompilieren und ausführen
Wenn mann aus C-Quellcode eine ausführbare Datei machen möchte, gibt es zwei Wege dies zu tun:
Die komplizierte Variante
Bekannte Editoren:
Windows Notepad+++
vi und Emacs (Linux/Unix)
TextMate (macOS)
Die All-in-one Variante
Natürlich wird ein Softwareentwickler meist mit einer Entwicklungsumgebung arbeiten. Aber um zu lernen, was beim Programmieren wirklich vor sich geht und ohne Ablenkung, wird meist zuerst die komplizierte Variante empfohlen.
Diese C11-Standart Compiler empfehle ich:
gcc aus der GNU Compiler Collection (Linux) LINK
MinGW (Windows)
PellesC (Windows)
Clang LLVM (macOS)
1. Entwickeln
#include
int main() {
printf("Hello World\n");
return 0;
}
2. Compelieren
Aus helloworld.c wird helloworld.exe, also eine ausführbare Datei.
3. Ausführten
Mittels Eingabe von open helloworld, wird das Programm gestartet. Wenn keine Fehler bei der Programmierung gemacht wurden, funktioniert das Programm wie erwartet und gibt „Hello World“ aus.
Ihr seht also, es ist gar nicht so schwer. Wie beim Tag 1 Artikel schon gesagt; das Grundprinzip ist immer: Eingabe- Verarbeitung- Ausgabe.
Vielen Dank fürs lesen!
-Faxe