Building wxPython 2.8.8.0 in MSW

I'm trying to build wxPython 2.8.8.0 and I am able to compile
wxWidgets but when I get to the setup up running setup.py build_ext I
end up with the following error:
building '_controls_' extension
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /DLL /nologo
/INCREMENTAL:NO /LIBPATH:C:\wxPython-src-2.8.8.0\lib\vc_dll /LIBPATH:c:\Python2
5\libs /LIBPATH:c:\Python25\PCBuild wxmsw28uh.lib kernel32.lib user32.lib gdi32.
lib comdlg32.lib winspool.lib winmm.lib shell32.lib oldnames.lib comctl32.lib od
bc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /EX
PORT:init_controls_ build.unicode\temp.win32-2.5\Release\src\msw\_controls_wrap.
obj /OUT:wx\_controls_.pyd /IMPLIB:build.unicode\temp.win32-2.5\Release\src\msw\
_controls_.lib
   Creating library build.unicode\temp.win32-2.5\Release\src\msw\_controls_.lib
and object build.unicode\temp.win32-2.5\Release\src\msw\_controls_.exp
_controls_wrap.obj : error LNK2001: unresolved external symbol "public: virtual
bool __thiscall wxDatePickerCtrlGeneric::GetRange(class wxDateTime *,class wxDat
eTime *)const " (?GetRange@wxDatePickerCtrlGeneric@@UBE_NPAVwxDateTime@@0@Z)
_controls_wrap.obj : error LNK2001: unresolved external symbol "public: virtual
void __thiscall wxDatePickerCtrlGeneric::SetRange(class wxDateTime const &,class
wxDateTime const &)" (?SetRange@wxDatePickerCtrlGeneric@@UAEXABVwxDateTime@@0@Z
)
_controls_wrap.obj : error LNK2001: unresolved external symbol "public: virtual
class wxDateTime __thiscall wxDatePickerCtrlGeneric::GetValue(void)const " (?Get
Value@wxDatePickerCtrlGeneric@@UBE?AVwxDateTime@@XZ)
_controls_wrap.obj : error LNK2001: unresolved external symbol "public: virtual
void __thiscall wxDatePickerCtrlGeneric::SetValue(class wxDateTime const &)" (?S
etValue@wxDatePickerCtrlGeneric@@UAEXABVwxDateTime@@@Z)
_controls_wrap.obj : error LNK2001: unresolved external symbol "protected: virtu
al class wxSize __thiscall wxDatePickerCtrlGeneric::DoGetBestSize(void)const " (
?DoGetBestSize@wxDatePickerCtrlGeneric@@MBE?AVwxSize@@XZ)
_controls_wrap.obj : error LNK2001: unresolved external symbol "public: virtual
bool __thiscall wxDatePickerCtrlGeneric::Destroy(void)" (?Destroy@wxDatePickerCt
rlGeneric@@UAE_NXZ)
_controls_wrap.obj : error LNK2001: unresolved external symbol "protected: virtu
al class wxEventHashTable & __thiscall wxDatePickerCtrlGeneric::GetEventHashTabl
e(void)const " (?GetEventHashTable@wxDatePickerCtrlGeneric@@MBEAAVwxEventHashTab
le@@XZ)
_controls_wrap.obj : error LNK2001: unresolved external symbol "protected: virtu
al struct wxEventTable const * __thiscall wxDatePickerCtrlGeneric::GetEventTable
(void)const " (?GetEventTable@wxDatePickerCtrlGeneric@@MBEPBUwxEventTable@@XZ)
_controls_wrap.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: __thiscall wxDatePickerCtrlGeneric::wxDatePickerCtrlGeneric(void)"
(__imp_??0wxDatePickerCtrlGeneric@@QAE@XZ) referenced in function __wrap_new_Pr
eGenericDatePickerCtrl
_controls_wrap.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: virtual __thiscall wxDatePickerCtrlGeneric::~wxDatePickerCtrlGener
ic(void)" (__imp_??1wxDatePickerCtrlGeneric@@UAE@XZ) referenced in function "pub
lic: virtual void * __thiscall wxDatePickerCtrlGeneric::`scalar deleting destruc
tor'(unsigned int)" (??_GwxDatePickerCtrlGeneric@@UAEPAXI@Z)
_controls_wrap.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: __thiscall wxDatePickerCtrlGeneric::wxDatePickerCtrlGeneric(class
wxWindow *,int,class wxDateTime const &,class wxPoint const &,class wxSize const
&,long,class wxValidator const &,class wxString const &)" (__imp_??0wxDatePicke
rCtrlGeneric@@QAE@PAVwxWindow@@HABVwxDateTime@@ABVwxPoint@@ABVwxSize@@JABVwxVali
dator@@ABVwxString@@@Z) referenced in function __wrap_new_GenericDatePickerCtrl
_controls_wrap.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: bool __thiscall wxDatePickerCtrlGeneric::Create(class wxWindow *,i
nt,class wxDateTime const &,class wxPoint const &,class wxSize const &,long,clas
s wxValidator const &,class wxString const &)" (__imp_?Create@wxDatePickerCtrlGe
neric@@QAE_NPAVwxWindow@@HABVwxDateTime@@ABVwxPoint@@ABVwxSize@@JABVwxValidator@
@ABVwxString@@@Z) referenced in function __wrap_GenericDatePickerCtrl_Create
wx\_controls_.pyd : fatal error LNK1120: 12 unresolved externals
error: command '"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link
.exe"' failed with exit status 1120

I am building with Python 2.5.1 and MSVC 7.10.6030 using the command:
python setup.py build_ext --inplace MONOLITHIC=1 UNICODE=1 USE_SWIG=1
SWIG=c:\\SWIG-1.3.29\swig.exe

Any help would be appreciated,
--Mark

That seems to have done it!
Thanks,
--Mark

···

On Fri, Jun 27, 2008 at 12:48 AM, Robin Dunn <robin@alldunn.com> wrote:

Mark Guagenti wrote:

Thanks, that seemed to fix that error but now I'm seeing:
Using SWIG-1.3.29
Preparing CORE...
Preparing GLCANVAS...
Preparing STC...
Preparing ACTIVEX...
Preparing GIZMOS...
running build_ext
building '_gizmos' extension
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c
/nologo /Ox
/MD /W3 /GX /DNDEBUG -DWIN32 -D_WINDOWS -D__WXMSW__ -DWXUSINGDLL=1
-DSWIG_TYPE_
TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1
-UNDEBUG -D_
_NO_VC_CRTDBG__ -D__WXDEBUG__ -DwxUSE_UNICODE=1 -Iinclude -Isrc
-IC:\wxPython-sr
c-2.8.8.0\lib\vc_dll\mswuh -IC:\wxPython-src-2.8.8.0\include
-IC:\wxPython-src-2
.8.8.0\contrib\include -Icontrib/gizmos -Icontrib\gizmos\wxCode\include
-Ic:\Pyt
hon25\include -Ic:\Python25\PC /Tpcontrib/gizmos\msw\gizmos_wrap.cpp
/Fobuild.un
icode\temp.win32-2.5\Release\contrib/gizmos\msw\gizmos_wrap.obj /Gy
cl : Command line warning D4025 : overriding '/DNDEBUG' with '/UNDEBUG'
gizmos_wrap.cpp
contrib\gizmos\msw\gizmos_wrap.cpp(11836) : error C2065: '_AxBaseWindow' :
undec
lared identifier
contrib\gizmos\msw\gizmos_wrap.cpp(11836) : error C2059: syntax error :
')'
contrib\gizmos\msw\gizmos_wrap.cpp(12994) : error C2059: syntax error :
')'
contrib\gizmos\msw\gizmos_wrap.cpp(12997) : fatal error C1903: unable to
recover
from previous error(s); stopping compilation
error: command '"C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\bin\cl.e
xe"' failed with exit status 2

Add this to pyclasses.h

#ifdef __WXMSW__
class _AxBaseWindow;
#endif

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users