How to compile C and Gtk+ with GCC on Linux?

前端 未结 5 1626
小蘑菇
小蘑菇 2020-12-31 20:12

I\'ve searched and searched but I\'m not getting the information I really want. Can someone please explain, as completely and fundamentally as possible, how Gtk+ code is com

5条回答
  •  独厮守ぢ
    2020-12-31 20:59

    by gtk2.0 example:

    $gcc test.c -o gnometest $(pkg-config --cflags --libs gtk+-2.0)
    

    by gtk3.0 example:

    $gcc $(pkg-config --cflags gtk+-3.) test.c -o gnometest $(pkg-config --libs gtk+-3.0) 
    

提交回复
热议问题