Compile errors using sstream

Kurt Kohler kohler@ao.com
Sat Jan 26 01:36:00 GMT 2008


Joe Buck wrote:
> On Sat, Jan 26, 2008 at 12:53:34AM +0000, Jonathan Wakely wrote:
>   
>> On 26/01/2008, Kurt Kohler <kohler@ao.com> wrote:
>>     
>>> When I include <sstream> (which I've done before in other files) I get the
>>> following compile errors:
>>>       
>> [snip]
>>     
>>> It looks like the underlying problem is that it can't find std::max.
>>>
>>> Any idea what I might be doing wrong?
>>>
>>> I can send a bit of my code if it would help.
>>>       
>> Only a bit probably won't help, as it might not show the part that
>> causes the error.  Can you produce a small testcase in a single file
>> that still produces the error?
>>     
>
> You might be defining a macro that clashes with something in the headers;
> "max" for example.
>
>
>   
Ah ha! I think that's it! I'm modifying old code (not mine!) and it  
does define max and min macros.

I'll fix it and let you know what happens.

Thanks for the help!

Kurt Kohler



More information about the Libstdc++ mailing list