Results 1 to 3 of 3

Thread: Auto-discovery of include files is not working

  1. #1
    Join Date
    May 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Exclamation Auto-discovery of include files is not working

    ]I'm having an include path problem trying to build Qt C++ projects in both Qt Creator and Eclipse. (I'm using Linux, the gcc toolchain and Qt4.6.2.) An interesting feature of the problem is that I have been able to create a new project, add code and libraries and build and run it once. If I then make a change to my code and try to recompile, I get about 100 compiler errors like the following:

    /usr/include/c++/4.5/cstring:76:11: error: ‘::memchr’ has not been declared
    /usr/include/c++/4.5/cstring:77:11: error: ‘::memcmp’ has not been declared
    /usr/include/c++/4.5/cstring:78:11: error: ‘::memcpy’ has not been declared
    /usr/include/c++/4.5/cstring:79:11: error: ‘::memmove’ has not been declared
    /usr/include/c++/4.5/cstring:80:11: error: ‘::memset’ has not been declared
    /usr/include/c++/4.5/cstring:81:11: error: ‘::strcat’ has not been declared
    ...

    When I build my own C++ projects in Eclipse I see path discovery activity like this:

    GNU C++ (SUSE Linux) version 4.5.0 20100521 [gcc-4_5-branch revision 159657] (x86_64-suse-linux)
    compiled by GNU C version 4.5.0 20100521 [gcc-4_5-branch revision 159657], GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    #include "..." search starts here:
    #include <...> search starts here:
    /usr/include/c++/4.5
    /usr/include/c++/4.5/x86_64-suse-linux
    /usr/include/c++/4.5/backward
    /usr/local/include
    /usr/lib64/gcc/x86_64-suse-linux/4.5/include
    /usr/lib64/gcc/x86_64-suse-linux/4.5/include-fixed
    /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/include
    /usr/include
    End of search list.
    ...

    This activity does not seem to take place when compiling Qt-based projects. In fact, the only way I've been able to build consistently is to use Eclipse to convert my Qt Gui project into a c++ project (File|New|Convert to a C++ Project). That, in itself, was a valuable exercise as I learned something about the Qt dependencies, but, perhaps a bit too much work. I obviously missed some important documentation. Can anyone point me in the right direction?

    Thanks.
    Last edited by Forte Systems; 3rd June 2010 at 04:31. Reason: typo

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Auto-discovery of include files is not working

    Guessing here, but gcc 4.5 is the very latest version of the Gnu compiler collection. It's quite possible that something has changed, say in the compiler flags, that qmake hasn't caught up with yet. It's vaguely possible that there's something wrong with your gcc installation, but I'd start with your specific qmakespec conf file and see if the settings used are consistent with those used by eclipse.

  3. #3
    Join Date
    May 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Auto-discovery of include files is not working

    Thanks. I recently upgraded from gcc 4.3. The problem existed in both versions of the toolchain.

Similar Threads

  1. How to include existing files to project?
    By Asperamanca in forum Qt Tools
    Replies: 2
    Last Post: 14th November 2009, 20:50
  2. Order of include files [c++ related]
    By Lykurg in forum Newbie
    Replies: 1
    Last Post: 10th November 2008, 12:56
  3. how to include object files in .pro file
    By babu198649 in forum Newbie
    Replies: 1
    Last Post: 1st July 2008, 08:23
  4. qmake: include files?
    By Doug Broadwell in forum Newbie
    Replies: 2
    Last Post: 16th May 2007, 23:34
  5. problem with include files
    By JR in forum General Discussion
    Replies: 2
    Last Post: 22nd December 2006, 20:44

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.