open-watcom / open-watcom-v2

Open Watcom V2.0 - Source code repository, Wiki, Latest Binary build, Archived builds including all installers for download.
Other
964 stars 157 forks source link

Strange heap errors when building wxwidgets #5

Open revelator opened 11 years ago

revelator commented 11 years ago

Earlier version 1.9 can build wxwidgets 2.12 but with this later version the linker crashes with a huge heap error. Ill try a build with your latest patches if it happens Again ill post the error.

revelator commented 11 years ago

Ok most of it seems to be caused by missing typedefs/exports in odbc, turning odbc builds off lets wxwidgets build.

Later versions of wxxwidgets like 2.95 do not build at all even though they totally removed odbc support :S

jmalak commented 11 years ago

I checked latest 2.8.x and it compiles OK after fixing librarian bug. I will check latest 2.9 if anything is wrong.

revelator commented 11 years ago

Ill try a 2.9 build as well, odbc support is the only thing i cant get working it seems. Opengl support Works but only in a static build but that was also the case with earlier open watcom builds (complains about no exports in the dll).

revelator commented 11 years ago

2.9.5 does not build incompatibilities with the newer png library (complains about setjmp being watcall instead of cdecl) might be other problems further Down the build tree.

jmalak commented 11 years ago

png source has stupid bug. I tried to include fix into png code but png guys are resistant to any "unimportant" change. for correct compilation you must setup in pnglibconf.h

define PNG_API_RULE 2

revelator commented 11 years ago

There loss then :/ though id thought they would be happy about getting it fixed.

Ill try with your fix, thanks.

revelator commented 11 years ago

Ok your fix Works for png but as expected there are further problems Down the chain.

STC fails to build stating that a struct cannot be used to create a constructor (not a C++ guru so cant comment on the correctness of that) and a few other Things like being unable to call a private member function (which is correct and seems to be a goofup in wxwidgets 2.9 series).

jmalak commented 11 years ago

It looks like wxwidgets 2.9.x use some C++ feature not supported by OW C++ compiler.

revelator commented 11 years ago

Guess OWSTL still needs some Work, not sure how up to date the list of missing features in it at the Open Watcom site is ?.

pchapin commented 11 years ago

OWSTL definitely still needs work. In fact, off the top of my head, I'd estimate that it's only about 1/2 done. The list of missing features on the Open Watcom site is probably not very accurate. It was never closely maintained as far as I know.

It's on my TODO list to continue adding to OWSTL but I don't think much will happen on that (from me anyway) this fall due to other pressures on my time. That said, if there are specific missing items that are causing immediate problems perhaps an enhancement request here (on GitHub) for those features would be good. It would help prioritize future work.

revelator commented 11 years ago

That would indeed be nice :) maybe one could scrounge a bit of the missing features from stlport ? would atleast make it a bit easier. SGI's stl is a bit to old now i guess so how much that would help im uncertain off.

C++11 support would probably be nice to, but if noone maintains it atm its probably better to just focus on getting the current implementation done.

revelator commented 11 years ago

using stlport i narrowed the errors Down to

F:\Compilers\Euphoria\WATCOM\H\NT\shlobj.h(3209): Error! E498: col(50) syntax error before 'IEnumPrivacyRecords'; probable cause: incorrectly spelled type name F:\Compilers\Euphoria\WATCOM\H\NT\shlobj.h(3209): Note! N393: col(50) included from ....\src\common\filename.cpp(1609) ....\src\common\filename.cpp(1614): Error! E504: col(1) syntax error before type name 'bool'

revelator commented 10 years ago

got that part fixed it seems ->

in basetyps.h change to this

/* Macros to declare interfaces - these macros can be used for both C and C++. Define

/* c++ does not understand struct (c specific) so we use a hack _/

if defined( **cplusplus ) && !defined( CINTERFACE )

define __STRUCT** struct

undef interface / in case it was allready defined /

define interface STRUCT

else

undef interface /_ in case it was allready defined */

define interface struct

endif

if defined( __cplusplus ) && !defined( CINTERFACE )

#define STDMETHOD( f )                          virtual HRESULT STDMETHODCALLTYPE f
#define STDMETHOD_( x, f )                      virtual x STDMETHODCALLTYPE f
#define STDMETHODV( f )                         virtual HRESULT STDMETHODVCALLTYPE f
#define STDMETHODV_( x, f )                     virtual x STDMETHODVCALLTYPE f
#define PURE                                    = 0
#define THIS_
#define THIS                                    void
#define DECLARE_INTERFACE( x )                  interface x
#define DECLARE_INTERFACE_( x, p )              interface x : public p

else

#define STDMETHOD( f )                          HRESULT (STDMETHODCALLTYPE *f)
#define STDMETHOD_( x, f )                      x (STDMETHODCALLTYPE *f)
#define STDMETHODV( f )                         HRESULT (STDMETHODVCALLTYPE *f)
#define STDMETHODV_( x, f )                     x (STDMETHODVCALLTYPE *f)
#define PURE
#define THIS_                                   INTERFACE FAR *This,
#define THIS                                    INTERFACE FAR *This
#ifdef CONST_VTABLE
    #define DECLARE_INTERFACE( x ) \
        typedef interface x { \
            const struct x##Vtbl *lpVtbl; \
        } x; \
        typedef const struct x##Vtbl x##Vtbl; \
        const struct x##Vtbl
#else
    #define DECLARE_INTERFACE( x ) \
        typedef interface x { \
            struct x##Vtbl *lpVtbl; \
        } x; \
        typedef struct x##Vtbl x##Vtbl; \
        struct x##Vtbl
#endif
#define DECLARE_INTERFACE_( x, p )              DECLARE_INTERFACE( x )

endif

used the mingw64 headers as an example

revelator commented 10 years ago

Ugh site is formatting the pastie :S might be better if i upload the file somewhere with comments.

This fixes one of the bugs with wxwidgets-2.9 -> syntax error before 'IEnumPrivacyRecords';

Cant build it yet though but atleast its one more bug squashed.

Feel free to change the code to something a bit less braindead :) i wrote it this way as a test only. It Works though.

revelator commented 10 years ago

Still cant build the latest wxwidgets but the fix above was allready implemented in another post from me so the rest is on the TODO list.

Just wanted to let contributors know.