67 This is a GUI application built with GTK and C that queries stock performance data via an external API using cURL.
This project is primarily configured to be built and run on Windows using the MSYS2/MinGW UCRT64 environment.
- MSYS2: A software distribution and building platform for Windows. Download and install it from the official site.
- GTK 3 and Build Tools: These will be installed via the MSYS2 package manager.
Since this project uses local cURL libraries and a custom Makefile, the process is streamlined once the environment is set up.
-
Install MSYS2 and Dependencies:
-
Open the MSYS2 MinGW UCRT64 shell.
-
Install the necessary GTK 3 libraries and the build chain (
gcc):pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gtk3
-
-
Organize Files:
- Ensure all your project files (
gui_app.c,api.c,Makefile, and the localcurl/folder) are in the same directory.
- Ensure all your project files (
-
Compile the Application:
-
In the MSYS2 UCRT64 shell, navigate to your project directory.
-
Run the simple command to compile the application:
make
-
(The Makefile handles finding the GTK libraries and linking the local cURL files.)
-
-
Run the Application:
-
Execute the compiled program directly using the included
runtarget:make run # Alternatively: # ./gui_app.exe
-
- API Key: Ensure your API key is correctly configured within your source code (e.g., in
api.c). - SSL Certificate: The cURL configuration specifies an SSL bundle path. Ensure the file
./curl-ca-bundle.crtis present in the same directory as the executable.
While the Makefile is heavily customized for Windows, it may still work on Linux/macOS if you adjust the PKG_CONFIG_PATH line for your system's GTK installation and correctly point to a local cURL library build.
General Steps:
1. Install gcc, gtk+-3.0-dev, and libcurl-dev.
2. Comment out the hardcoded PKG_CONFIG_PATH in the Makefile.
3. Ensure your local cURL directory (./curl/) is correctly structured or link against the system libcurl.
67 67 67