Page 1 of 1

[share]how to build WxWidgets on VC6

Posted: Thu Jul 05, 2012 2:37 am
by tfzxyinhao
when build Wxwidgets on VC6 ,you will receive some error linke "fatal error C1001: INTERNAL COMPILER ERROR" ,and double click this error ,VC6 will open the wx/datetime.h .
and location in the follow code

Code: Select all

inline bool operator<(const wxTimeSpan &ts) const
    {
        return GetValue() < ts.GetValue();
    }
    inline bool operator<=(const wxTimeSpan &ts) const
    {
        return GetValue() <= ts.GetValue();
    }
    inline bool operator>(const wxTimeSpan &ts) const
    {
        return GetValue() > ts.GetValue();
    }
	
    inline bool operator>=(const wxTimeSpan &ts) const
    {
        return GetValue() >= ts.GetValue();
    }
now you need to modify it to the follow

Code: Select all

inline bool operator<(const wxTimeSpan &ts) const
    {
        return GetValue().ToLong() < ts.GetValue().ToLong();
    }
	
    inline bool operator<=(const wxTimeSpan &ts) const
    {
        return GetValue().ToLong() <= ts.GetValue().ToLong();
    }

    inline bool operator>(const wxTimeSpan &ts) const
    {
        return GetValue().ToLong() > ts.GetValue().ToLong();
    }
	
	
    inline bool operator>=(const wxTimeSpan &ts) const
    {
        return GetValue().ToLong() >= ts.GetValue().ToLong();
    }
have fun!

Re: [share]how to build WxWidgets on VC6

Posted: Thu Jul 05, 2012 2:29 pm
by PB
Hi!

if there's really a problem building wxWidgets with VC6, I believe you should file a ticket and submit the fix as a patch (if you or anyone else didn't do that already). For some reason, wxWidgets maintainers are set on keeping VC6 compatibility for both 2.8 and 2.9, so if there's an issue like that, they will fix it. Thanks.

Edit
For whatever it is worth, I can successfully compile both wxWidgets 2.8.12 and 2.9-SVN (revision 71965) with MSVC6 Standard (Service Pack 6, IIRC) using

Code: Select all

nmake -f makefile.vc BUILD=debug UNICODE=1
without any source modification.

Re: [share]how to build WxWidgets on VC6

Posted: Wed Jul 10, 2013 10:39 am
by eranon
Hello. Maybe related to this known VC6 issue : http://support.microsoft.com/kb/236935/en-us, where it's said that you have to remove all temporary files (then, clean-up build) before to build after a VC6's service pack.