Using pkg-config as compiler and linker flags: Revision history

From AcrodusWiki

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

3 December 2024

  • curprev 09:0309:03, 3 December 2024Alex talk contribs 803 bytes +803 Created page with "Came across pkg-config files for the first time when using gtk4. The below extract is the makefile for that hello world test. <pre> CFLAGS = -Wall -g `pkg-config --cflags gtk4` LDFLAGS = `pkg-config --libs gtk4` all: gtk_test.c gcc -o gtk_test gtk_test.c $(CFLAGS) $(LDFLAGS) clean: rm -f *~ rm -f *.o rm -f gtk_test </pre> Main thing here is the addition of the compiler and linker flags at the top. These use the shell environment variab..."