I use the GCC C compiler on both MacOS and Windows with no problems. Recently I have been compiling with GCC utilizing GTK for the user interface along with a SQLite database to create my cross-platform food recipe finder app. Below are the compiler instructions I include in my app for both MacOS and Windows that may help you with your current situation. (Note that my app links json, curl, gumbo, and sqlite3 libraries, which are part of the compiler switches I need.) Best of luck, John M. My GitHub repo webpage for the first release of recipe_finder.c is: https:/github.com/j2kGit/recipe_finder --------------------------------------------------------------------------- BUILD INSTRUCTIONS AND COMPILER NOTES: (AS OF SEPTEMBER 2025) --------------------------------------------------------------------------- macOS (Homebrew): - Install dependencies: brew install gcc@13 pkg-config gtk+3 json-c curl gumbo-parser sqlite node npm - Link GCC 13 so it’s available as `gcc-13`: brew link gcc@13 --overwrite - Install Playwright + supporting npm packages: npm install -g playwright cheerio axios npx playwright install - macOS compile command: gcc-13 $(pkg-config --cflags gtk+-3.0 json-c libcurl gumbo sqlite3) -std=c11 -Wall -Wextra -g recipe_finder_db.c -o recipe_finder_db $(pkg-config --libs gtk+-3.0 json-c libcurl gumbo sqlite3) What it does: • gcc-13 Calls GCC version 13 from Homebrew (`/opt/homebrew/bin/gcc-13` on Apple Silicon). • $(pkg-config --cflags gtk+-3.0 json-c) Adds include paths for GTK 3 and json-c. • -std=c11 -Wall -Wextra -g Enables C11 standard, warnings, and debugging info. • recipe_finder_db.c Your source file. • -o recipe_finder_db Names the compiled binary. • $(pkg-config --libs gtk+-3.0 json-c) Adds linker flags for GTK 3 and json-c. • -lcurl -lgumbo -lsqlite3 Links curl, gumbo, and sqlite3 libraries. Tips: • Use `brew --prefix` to troubleshoot include or library paths. • On macOS, system curl may conflict with Homebrew’s; if you see linker errors, try: pkg-config --cflags --libs libcurl • Sometimes you may also need `-lm` (math library). • GTK 3 GUI apps may require XQuartz on macOS. --------------------------------------------------------------------------- Windows (MSYS2 MinGW 64-bit): GCC Compiler Notes: - Compiler: GCC (MSYS2 MinGW 64-bit) - Required version: GCC 11.0 or higher (Due to use of C11 features and GLib/GTK compatibility) - Recommended: GCC 15.2.0 or later (Latest tested version: 15.2.0, updated 2025-08-17) (Check with: gcc --version) - MSYS2 Environment: - Terminal: MSYS2 MinGW 64-bit shell (MINGW64) - MSYS2 runtime version: 3.6.4-1 (Verify with: pacman -Qi msys2-runtime) - Kernel/environment info: MINGW64_NT-10.0-26100 (Verify with: uname -a) - pacman version: 6.1.0 (Verify with: pacman -V) - Install required dependencies: pacman -S mingw-w64-x86_64-gtk3 \ mingw-w64-x86_64-json-c \ mingw-w64-x86_64-curl \ mingw-w64-x86_64-gumbo - GTK version used in development: GTK 3.24.50 (as of September 2025) - Windows compile command: gcc -o recipe_finder_db.exe recipe_finder_db.c $(pkg-config --cflags --libs gtk+-3.0 json-c) -lcurl -lgumbo -lsqlite3 -Wall -Wextra -std=c11 -g --------------------------------------------------------------------------- On Oct 2, 2025, at 2:43 AM, Hubert Kauker <[email protected]> wrote:
|
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
