https://github.com/andrewrgarcia/klang
A simple compiling script for C++ files using the clang++ compiler
https://github.com/andrewrgarcia/klang
cpp
Last synced: 3 months ago
JSON representation
A simple compiling script for C++ files using the clang++ compiler
- Host: GitHub
- URL: https://github.com/andrewrgarcia/klang
- Owner: andrewrgarcia
- License: mit
- Created: 2022-06-22T00:03:12.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-14T21:25:39.000Z (about 3 years ago)
- Last Synced: 2025-01-16T15:26:53.505Z (over 1 year ago)
- Topics: cpp
- Language: Shell
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# klang
A set of shell `.sh` programs to compile C++ files using the clang++ compiler
**klang.sh** - The standard C++ --> executable compiler script
**klangle.sh** - compiler script with OpenGL flags (graphics / rendering)
Andrew Garcia, 2022
### Setup
place in a folder i.e. `$HOME/my_folder/`
On Terminal inside this folder:
```
chmod +x klang.sh
chmod +x klangle.sh
```
#### To call scripts from anywhere:
On Terminal:
```
gedit .bashrc
```
On **.bashrc**:
```
alias klang=`$HOME/my_folder/klang.sh`
alias klangle=`$HOME/my_folder/klangle.sh`
```
On Terminal:
```
$source ~/.bashrc
```
### Usage:
```ruby
#single .cpp input
klang your_file.cpp
#multiple .cpp inputs (Usually the case for .cpp program with multiple .cpp dependencies)
klang main_file.cpp dependency1.cpp dependency2.cpp dependency3.cpp
```
Running compiled program:
```
./main_file.k
```