Phoenix icon indicating copy to clipboard operation
Phoenix copied to clipboard

Windows MVC Compiler Error C2078 in SIP generated code ...

Open bitranox opened this issue 3 years ago • 5 comments

@swt2c : compiling of the source on github on windows , python 3.10, 64 bit :

after solving the SIP6 issue, some SIP generated *.cpp files can not be compiled :

c:\users\rnowotny\phoenix\sip\cpp\sip_corecmodule.cpp(19899): error C2078: Zu viele Initialisierungen

if You take away one Line of this code, it can compile - any idea where/how to fix that ? After taking away those lines manually, the whole project can compile under windows, and I can create a wheel.

/* files affected : 
sip/cpp/sip_advcmodule.cpp
sip/cpp/sip_auicmodule.cpp
sip/cpp/sip_corecmodule.cpp
sip/cpp/sip_dataviewcmodule.cpp
sip/cpp/sip_glcanvascmodule.cpp
sip/cpp/sip_gridcmodule.cpp
sip/cpp/sip_html2cmodule.cpp
sip/cpp/sip_htmlcmodule.cpp
sip/cpp/sip_mediacmodule.cpp
sip/cpp/sip_mswcmodule.cpp
sip/cpp/sip_propgridcmodule.cpp
sip/cpp/sip_ribboncmodule.cpp
sip/cpp/sip_richtextcmodule.cpp
sip/cpp/sip_stccmodule.cpp
sip/cpp/sip_webkitcmodule.cpp
sip/cpp/sip_xmlcmodule.cpp
sip/cpp/sip_xrccmodule.cpp
*/

Code Snippet :

/* This defines this module. */
sipExportedModuleDef sipModuleAPI__adv = {
    0,
    SIP_ABI_MINOR_VERSION,
    sipNameNr_wx__adv,
    0,
    sipStrings__adv,
    importsTable,
    SIP_NULLPTR,
    57,
    sipExportedTypes__adv,
    SIP_NULLPTR,
    53,
    enummembers,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, stringInstances, intInstances, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    /* just take away the following line, and it can compile */
    SIP_NULLPTR,
};

@swt2c: would You please be so kind and point me to the right direction where to fix this ?

yours sincerely Bitranox, Vienna, Austria

bitranox avatar Nov 29 '21 11:11 bitranox

What version of sip are you using?

swt2c avatar Nov 29 '21 13:11 swt2c

SIP Version is 6.4.0 - this is what You get nowadays if You pip install SIP

bitranox avatar Nov 29 '21 14:11 bitranox

When you updated sip, did you also update the files in sip/siplib?

swt2c avatar Dec 01 '21 17:12 swt2c

yes I did - but if i do that, the generated files show many more errors and can not compile.

bitranox avatar Dec 01 '21 19:12 bitranox

sip 5.5.0 is the version you MUST install.

kdschlosser avatar Jan 19 '22 01:01 kdschlosser