[Openstreetmap-dev] Re: osmeditor make problem

Immanuel Scholz immanuel.scholz at gmx.de
Wed Jan 11 22:16:55 GMT 2006


moved to dev

> <rant>
> It's *so* annoying how these errors crop up in some distributions and not
> others. Makes identification of this type of error virtually
> impossible....:-(
> </rant>

Well.. looking at the code, the compiler is fully right:
While compiling osmeditor2.cpp, <cmath> is not included before using it.

That it works for some people, this is because the C++ Standard does not 
specify the header dependencies of the standard headers (unlike in C).

So if some implementation of the standard library headers by accident include 
cmath in any standard header before (e.g. <vector>), then it works for this 

But this will not be legal Standard C++ until the missing cmath include is 

Ciao, Imi.

By the way: Many coders consider think it is very dirty to use "using" 
directives in header files.

More information about the dev mailing list