https://github.com/themayursinha/calc
calc app in C
https://github.com/themayursinha/calc
c gtk3 gui
Last synced: 2 months ago
JSON representation
calc app in C
- Host: GitHub
- URL: https://github.com/themayursinha/calc
- Owner: themayursinha
- License: mit
- Created: 2024-02-06T00:13:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-06T14:44:54.000Z (over 2 years ago)
- Last Synced: 2025-02-06T04:41:11.420Z (over 1 year ago)
- Topics: c, gtk3, gui
- Language: C
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Attempt to build a calculator app in C
This project is a simple calculator application built with C and GTK+ 3. It demonstrates basic GUI application development on macOS, specifically for systems with the M1 chip, using the GTK+ 3 framework.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Before you begin, ensure you have the following installed on your macOS system:
- Homebrew
- GTK+ 3
- pkg-config
- Clang compiler
If you're using Visual Studio Code, you might need to configure the include paths for IntelliSense.
Note: The .vscode folder is excluded from this repository to maintain environment neutrality. You should configure it based on your local development environment.
To compile the calculator app, navigate to the project root directory and run:
```
clang `pkg-config --cflags gtk+-3.0` -o calculator_gui gui/gui.c src/calculator.c -Isrc/ `pkg-config --libs gtk+-3.0`
```
After compilation, you can run the application with:
```
./calculator_gui
```
Or make use of Makefile. To compile the calculator app, simply navigate to the project root directory and run the following command:
```sh
make
```
This command will compile the source files and generate an executable named `calculator_gui`.
After compiling the application, you can run it directly from the terminal:
```
./calculator_gui
```
If you want to clean up the build files (object files and the executable), run:
```
make clean
```