Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Why the compiler can't search the sub-dir of the standard include-search-path?

[Solved] Why the compiler can't search the sub-dir of the standard include-search-path?

Scheduled Pinned Locked Moved General and Desktop
compilercompiling qt
6 Posts 2 Posters 3.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JohnYork
    wrote on 21 Mar 2015, 14:50 last edited by sierdzio
    #1

    Hi, every one!
    I'm just building Qt 5.4.1 with MinGW 4.9.2 in MSYS2. for the support of glib, I download the glib library of MinGW in MSYS2, and install it in the MinGW's default include-and-library paths with MSYS2(/MinGW64/include and /MinGW64/lib). But after installing library, the header and library files of glib are stored in a sub-dir which is named with 'glib-2.0' of every include and library dirs.
    While compiling the Qt, I passed the parameters to ./configure like this:

    -opensource -glib -I ./glib-2.0 -L ./glib-2.0

    But when compiling, I got the following error message :

    In file included from glib.cpp:36:0:
    C:/Qt/msys64/mingw64/include/glib-2.0/glib.h:31:25: fatal error: glib/garray.h: No such file or directory
    #include <glib/garray.h>
    ^
    compilation terminated.
    Makefile:161: recipe for target 'glib.o' failed
    make: *** [glib.o] Error 1
    Glib disabled.
    Glib support cannot be enabled due to functionality tests!
    Use of pkg-config is not enabled, maybe you want to pass -force-pkg-config?
    Turn on verbose messaging (-v) to /d/myprojects/qtc/src/qtbase/configure to see the final report.
    If you believe this message is in error you may use the continue
    switch (-continue) to /d/myprojects/qtc/src/qtbase/configure to continue.

    I have checked the dir /MinGW64/include, and found the file 'garray.h' and many other header files are stored in dir 'glib-2.0/glib/'. So I thought the compiler should be able to find the specified file. But why it can't ? and how to resolve it ?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 21 Mar 2015, 16:57 last edited by
      #2

      Are you sure './' in your include paths (-I and -L) is the right directory to start in?

      (Z(:^

      J 1 Reply Last reply 21 Mar 2015, 18:23
      0
      • S sierdzio
        21 Mar 2015, 16:57

        Are you sure './' in your include paths (-I and -L) is the right directory to start in?

        J Offline
        J Offline
        JohnYork
        wrote on 21 Mar 2015, 18:23 last edited by JohnYork
        #3

        @sierdzio Thanks for your replying!
        Actually, I'm not sure './' is correct. But if I doesn't pass parameters to ./configure with '-I ./glib-2.0' like above mentioned, I'll got an error message that says 'can not find glib.h: No such file or directory'. So I think './' should worked, as descripted above , partially.
        So, what's wrong with it? Can you help me? Thx.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 22 Mar 2015, 08:56 last edited by
          #4

          './' means "current directory", so the directory where you run configure. This is probably the same directory where your Qt source code is located - it does not contain glib. So I would advise to pass a proper, non-relative path to glib there instead.

          (Z(:^

          J 1 Reply Last reply 24 Mar 2015, 12:30
          0
          • S sierdzio
            22 Mar 2015, 08:56

            './' means "current directory", so the directory where you run configure. This is probably the same directory where your Qt source code is located - it does not contain glib. So I would advise to pass a proper, non-relative path to glib there instead.

            J Offline
            J Offline
            JohnYork
            wrote on 24 Mar 2015, 12:30 last edited by
            #5

            @sierdzio Thx! I've tested on replacing full path to '-I' option with './' as you memtioned, and it worked well ^-^! Thank you very much!

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sierdzio
              Moderators
              wrote on 24 Mar 2015, 12:34 last edited by
              #6

              You are welcome. Happy coding

              (Z(:^

              1 Reply Last reply
              0

              1/6

              21 Mar 2015, 14:50

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved