Why can't I build a “hello world” for glib?

前端 未结 5 1449
走了就别回头了
走了就别回头了 2021-01-30 13:26

So here\'s the world\'s simplest glib program:

#include 

I try to compile it with gcc test.c and I get:



        
5条回答
  •  隐瞒了意图╮
    2021-01-30 13:41

    As @chris said use pkg-config.

    glibconfig.h is missing 
    

    it’s because this file is not in the /usr/include/glib-2.0, but in /usr/lib/glib-2.0. So you have to include also this /usr/lib path or copy the file to the /include/glib-2.0

提交回复
热议问题