[Qt-interest] g++ headers not found in Ubuntu

Andreas Pakulat apaku at gmx.de
Sat Apr 17 18:03:48 CEST 2010


On 17.04.10 10:59:47, uanacho wrote:
> gcc and g++ it's already installed on ubuntu Linux.
> 
> The headers are in: usr/include and /usr/include/g++/4.4.1
> 
> I'll copy an excerpt of the makefile generated by QtCreator
> 
> You could see that in INCPATH label and LIB label references to X11R6
> directory. I think this is the problem, it cannot find the usr/lib and
> usr/include directory.

No thats not the problem. The STL includes are found by the compiler
itself, there's no -I switch needed for it. Are you sure that g++ is 4.4.1?
If not it won't find the headers in /usr/include/g++/4.4.1. I suggest you
start simple and try:

g++ main.cpp

With a main.cpp that has this content:

,----
| #include <string>
| #include <iostream>
| 
| int main()
| {
| std::string s("Test");
| std::cout << s << std::endl;
| }
`----

Andreas

-- 
You'd like to do it instantaneously, but that's too slow.



More information about the Qt-interest-old mailing list