Results 1 to 2 of 2

Thread: glib.h: No such file or directory compilation terminated.

  1. #1
    Join Date
    Feb 2012
    Beans
    12

    glib.h: No such file or directory compilation terminated.

    I'm trying to compile a C source code file with gcc.

    The file includes glib.h
    Code:
    #include <glib.h>
    And, when compiling:
    gps_example.c:1:18: fatal error: glib.h: No such file or directory
    compilation terminated.
    I do, however, have glib.h in my system. Running find /usr -iname glib.h returns:
    /usr/include/glib-2.0/glib.h
    My system has glib.h, but for some reason my system doesn't think it has the .h file. How can I tell it where glib.h is?

  2. #2
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: glib.h: No such file or directory compilation terminated.

    You need to add the output of

    Code:
    pkg-config --cflags glib-2.0
    to your compiler flags.
    「明後日の夕方には帰ってるからね。」


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •