Re: Needed Help with Gtk+ 2.8, Gtkmm 2.8, and .Net 2005



Thank you Frank,

I had NO idea that the windows.h file was such a problem. & I'd NEVER thought of it but I have had issues with it in the past. And I tried the #undef max and it WORKED!!!!!! Beautiful, another miracle. Thank you Frank.

The boy from Alabama is happy now! :-)

Frank Naumann wrote:
Hello!

This is a DEFINITE BUG.  So how, this max function, void max( const
Glib::RefPtr<Coverage>& other) const;  MUST already be defined as a
try C macro, as the error states.  Therefore there is a conflict
somewhere.

Yes, you are including something that is #defining max, before you are
including the gtkmm header. This is namespace pollution.

You could try
#undef max
before including the gtkmm header.

Yes, I already fighted a lot with such problems. The problem are the windows header files (windows.h). This header is polluted with lot of defines, max is only one. It's for sure very ugly and the source of lot of problems.

I personally ended up to include the windows header at last (after ALL other headers). Best is for sure to not include the windows.h at all or to minimize the usage of windows.h. There was also one case I needed to #undef something.


Regards,
Frank


--
Sincerely, Allen

Gene Allen Saucier, Jr
Senior Software Engineer
CAS, Inc
100 Quality Circle
Huntsville, AL  35806
or
PO Box 11190
Huntsville, AL  35814
(256) 922-6453 (w)
"As for I and my house, we shall follow the Lord"  Joseph




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]