Making the command cleaner

If i have a C code containing gtk library and wanna compile it, i do this

gcc pkg-config --cflags gtk+-3.0 -o hello-world-gtk hello-world-gtk.c pkg-config --libs gtk+-3.0

the reference here

Is there a way to make the command cleaner like this for example
gcc -o hello-world-gtk hello-world-gtk.c

and put the extra part

pkg-config --cflags gtk+-3.0``pkg-config --libs gtk+-3.0

in the source code file itself ?

1 Like

There’s no way to do that. I suggest using Meson to automate your builds.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.