Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dezashibi-c/b-hello-world
How to get started in C as fast as possible, including installer scripts for windows
https://github.com/dezashibi-c/b-hello-world
c cmake devcpp gcc gcc-for-windows git installer make makefile windows
Last synced: about 1 month ago
JSON representation
How to get started in C as fast as possible, including installer scripts for windows
- Host: GitHub
- URL: https://github.com/dezashibi-c/b-hello-world
- Owner: dezashibi-c
- License: other
- Created: 2024-07-22T07:18:23.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-21T05:10:56.000Z (4 months ago)
- Last Synced: 2024-08-21T14:24:16.340Z (4 months ago)
- Topics: c, cmake, devcpp, gcc, gcc-for-windows, git, installer, make, makefile, windows
- Language: C
- Homepage:
- Size: 9.77 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hello World (Beginner)
Get started with C as quickly as possible.
## What is the `Hello World` project all about?
This repository contains concise code examples with sufficient explanations to help readers begin programming in C. The focus is on idiomatic and standard C practices without complicated or overly opinionated design decisions.
**NOTE: I've purposefully have used `.exe` for target extension files in examples, it makes the `Makefile` and the compile commands can be used on windows and linux the same.**
## Setting Up the Compiler
There are numerous resources available for setting up a C compiler, and if you're here, you likely have one installed. This guide assumes you're familiar with command-line compilation using `gcc` or `clang` on POSIX or Wondows operating systems.
If you prefer using an IDE like CLion or Visual Studio 2022, feel free to consult specific resources for those tools.
### An Alternative
The `Zig` programming language compiler can serve as a convenient, drop-in C compiler.
You can download it from [here](https://ziglang.org/learn/getting-started/#installing-zig). After installation, add it to your system path or use it directly from the command line with `../../zig/zig cc ...`. You get the idea.
### Portable development environment for Windows users
Here is an alternative if you want a portable and fully configured `gnu` build environment check out [W64DevKit](https://github.com/skeeto/w64devkit).
To setup and config the environment automatically you can run the following script ([source code here](/install.ps1)) on Windows Powershell:
```powershell
powershell -c "irm https://raw.githubusercontent.com/dezashibi-c/b-hello-world/main/install.ps1 | iex"
```**Note:** The script downloads the latest release and install it in `C` drive and add the bin folder
to the user's `PATH`.#### Need `CMake` and `git`, what about good old `DevCPP`?
Don't worry I have that script for you as well!
Same as `W64DevKit` installer, this script downloads latest `DevCPP`, `git` and `cmake`, extract them to `C` drive and add their corresponding bin folder to the user's `PATH`, for `DevCPP` a shortcut to it's portable executable file also will be created on your desktop.
```powershell
powershell -c "irm https://raw.githubusercontent.com/dezashibi-c/b-hello-world/main/install_extra.ps1 | iex"
```**👉 Together with `W64DevKit` you have now everything to start writing code, well go on!**
## Wait, What about a cmake template?, I really really like to start coding right away!
Alright, Alright, I hear you, [check out here](https://github.com/dezashibi-c/cmake_template).
## License
Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) License.
Please refer to [LICENSE](/LICENSE) file.
## DevCPP License
The [devcpp.zip](/devcpp.zip) file is built by downloading the latest version of `Dev-C++` from [here](https://github.com/Embarcadero/Dev-Cpp/releases/tag/v6.3), extracting it and re-packing it to `zip` instead of `7z` after configuration to work with `W64DevKit`.
👉 This re-distribution complies with `Dev-C++` license [here](https://github.com/Embarcadero/Dev-Cpp/blob/master/LICENSE).