[share]how to build WxWidgets on VC6

If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
Post Reply
tfzxyinhao
In need of some credit
In need of some credit
Posts: 1
Joined: Wed Jul 04, 2012 9:46 am

[share]how to build WxWidgets on VC6

Post 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!
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: [share]how to build WxWidgets on VC6

Post 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.
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: [share]how to build WxWidgets on VC6

Post 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.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Post Reply