Forte Systems
3rd June 2010, 04:28
]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.
/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.