[wxPython] Troubles compiling wxpython2.2.2 under MSW

Hey,

I have a problem to build a debug version from wxPython 2.2.2.
I download the sources from wxWindows and wxPython. Then I build wxWindows -
no error.
After I start the build of wxPython I receive an fatal error:

python setup.py build_ext --debug --inplace
.
.
.
E:\Program Files\Microsoft Visual Studio\VC98\Bin\cl.exe /c /nologo /Od /MDd
/W3
/GX /Z7 /D_DEBUG -DWIN32 -D__WIN32__ -D_WINDOWS -D__WINDOWS__
-DWINVER=0x0400 -
D__WIN95__ -DSTRICT -D__WXMSW__ -DWXUSINGDLL=1 -DSWIG_GLOBAL -DHAVE_CONFIG_H
-DW
XP_USE_THREAD=1 -D__WXDEBUG__ -D__WX__ -DSCI_LEXER -Isrc -IF:\wxWin2\include
-Ic
ontrib/ogl/contrib/include -Icontrib/stc/contrib/src/stc/scintilla/include
-Icon
trib/stc/contrib/src/stc/scintilla/src -Icontrib/stc/contrib/include
-IF:\dSPACE
\ControlDesk\Python\Include /Tpsrc\msw\wx.cpp
/Fobuild\temp.win32-1.5\Debug\src\
msw\wx.obj
wx.cpp
src\msw\wx.cpp(395) : warning C4101: 'obj' : unreferenced local variable
src\msw\wx.cpp(1680) : fatal error C1001: INTERNAL COMPILER ERROR
        (compiler file 'msc1.cpp', line 1794)
         Please choose the Technical Support command on the Visual C++
         Help menu, or open the Technical Support help file for more
information

error: command 'cl.exe' failed with exit status 2

I use Visual C++ 6 with service pack 3 under Win2k (service pack 1) and
python 1.5.2.

I try to compile the wx.cpp into the VC IDE. I get the same error message.
But after if I comment out the error line or disable the "Enable exception
handling" flag , the compiler detect no error.

Any ideas?

Dirk

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

src\msw\wx.cpp(1680) : fatal error C1001: INTERNAL COMPILER ERROR
        (compiler file 'msc1.cpp', line 1794)
         Please choose the Technical Support command on the Visual C++
         Help menu, or open the Technical Support help file for more
information

I used to get this error too and the old build system added /GX- to the
flags to get around it. When I switched to using distutils the problem went
away and so I figured it was something to do with a new set of compiler
flags that fixed it.

If you edit setup.py and make the code around line 154 look like this then
you can do the same workaround:

    cflags = ['/GX-'] # workaround for internal compiler error in MSVC
    lflags = None

    if not FINAL and HYBRID:
        cflags = cflags + ['/Od', '/Z7']
        lflags = ['/DEBUG', ]

error: command 'cl.exe' failed with exit status 2

I use Visual C++ 6 with service pack 3 under Win2k (service pack 1) and
python 1.5.2.

You might try SP4 as that is what I have and as I said I don't get the error
any more.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org Java give you jitters?
http://wxPROs.com Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users