Can you show the line just before this one? It should have "cl.exe" in
it and show the command line parameters passed to the compiler.
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 -I..\lib\vc_dll\mswuh -I..\include -I..\contrib\include -Ic:\Python25\include -Ic:\Python25\PC /Tpsrc\msw\_core_wrap.cpp /Fobuild.unicode\temp.win32-2.5\Release\src\msw\_core_wrap.obj /Gy
_core_wrap.cpp
I've pasted the entire spew after issuing the python setup.py command below my signature in this response.
This can happen if there is a mismatch between how __WXDEBUG__ is defined between wxMSW and wxPython. The others are a bit more puzzling however...
The compiler also prints this as it is working, which may be what is causing the assert errors:
cl : Command line warning D4025 : overriding '/DNDEBUG' with '/UNDEBUG'
In my own builds, I didn't get the assert errors because I was using FINAL=1; but for the purposes of this email thread I decided to use the build settings as documented in the build instructions.
You've probably already done this a million times, but if not please make sure that you are starting with a clean wx source tree and that there isn't any chance that wxPython may be trying to link with some other build of wxMSW.
It can't be using some other build of wxWidgets. I'm starting with the wx source tree that comes with the wxPython source distribution (wxPython-src-2.8.6.0), and I have no registry entries or environment variables for any other wx stuff; in fact, I've removed all other traces of wx from my system. You can see from the command line parameters passed to cl.exe that it is looking for the libs in the wxPython source tree: -I..\lib\vc_dll\mswuh and when I delete all of the libs there I get "can't find library" errors as expected. Before signing up for this list and posting this message, I spent a lot of time searching google and someone had these exact build errors back in 2006 but there was never any resolution to it. I attempted to integrate wxPython like this back in late 2007 and ran into these same issues so I shelved the wxPython integration due to lake of time to figure it out, but now I'm running into the same issues on a newer build. I'd really love to get wxPython working.
Can no one reproduce these errors? I've tried on several machines and end up with the same result.
- Jamie
Initial python setup.py run:
Preparing CORE...
Preparing GLCANVAS...
Preparing STC...
Preparing ACTIVEX...
Preparing GIZMOS...
running build_ext
building '_core_' extension
creating build.unicode
creating build.unicode\temp.win32-2.5
creating build.unicode\temp.win32-2.5\Release
creating build.unicode\temp.win32-2.5\Release\src
creating build.unicode\temp.win32-2.5\Release\src\msw
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 -I..\lib\vc_dll\mswuh -I..\include -I..\contrib\include -Ic:\Python25\include -Ic:\Python25\PC /Tpsrc/helpers.cpp /Fobuild.unicode\temp.win32-2.5\Release\src/helpers.obj /Gy
helpers.cpp
cl : Command line warning D4025 : overriding '/DNDEBUG' with '/UNDEBUG'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\rc.exe -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 -I..\lib\vc_dll\mswuh -I..\include -I..\contrib\include -Ic:\Python25\include -Ic:\Python25\PC /fobuild.unicode\temp.win32-2.5\Release\src/wxc.res src/wxc.rc
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 -I..\lib\vc_dll\mswuh -I..\include -I..\contrib\include -Ic:\Python25\include -Ic:\Python25\PC /Tpsrc\msw\_core_wrap.cpp /Fobuild.unicode\temp.win32-2.5\Release\src\msw\_core_wrap.obj /Gy
_core_wrap.cpp
cl : Command line warning D4025 : overriding '/DNDEBUG' with '/UNDEBUG'
src\msw\_core_wrap.cpp(4419) : warning C4996: 'wxSizer::Remove' was declared deprecated
..\include\wx\sizer.h(499) : see declaration of 'wxSizer::Remove'
src\msw\_core_wrap.cpp(32984) : warning C4996: 'wxGetAccelFromString' was declared deprecated
..\include\wx\utils.h(573) : see declaration of 'wxGetAccelFromString'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:..\lib\vc_dll /LIBPATH:c:\Python25\libs /LIBPATH:c:\Python25\PCBuild wxbase28uh.lib wxbase28uh_net.lib wxbase28uh_xml.lib wxmsw28uh_core.lib wxmsw28uh_adv.lib wxmsw28uh_html.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib oldnames.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /EXPORT:init_core_ build.unicode\temp.win32-2.5\Release\src/helpers.obj build.unicode\temp.win32-2.5\Release\src/wxc.res build.unicode\temp.win32-2.5\Release\src\msw\_core_wrap.obj /OUT:wx\_core_.pyd /IMPLIB:build.unicode\temp.win32-2.5\Release\src\_core_.lib
Creating library build.unicode\temp.win32-2.5\Release\src\_core_.lib and object build.unicode\temp.win32-2.5\Release\src\_core_.exp
helpers.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl wxOnAssert(unsigned short const *,int,char const *,unsigned short const *,unsigned short const *)" (__imp_?wxOnAssert@@YAXPBGHPBD00@Z) referenced in function "public: void __thiscall wxMemoryBuffer::SetDataLen(unsigned int)" (?SetDataLen@wxMemoryBuffer@@QAEXI@Z)
_core_wrap.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl wxOnAssert(unsigned short const *,int,char const *,unsigned short const *,unsigned short const *)" (__imp_?wxOnAssert@@YAXPBGHPBD00@Z) referenced in function _init_core_
helpers.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall wxString::Cmp(unsigned short const *)const " (__imp_?Cmp@wxString@@QBEHPBG@Z) referenced in function "bool __cdecl operator==(class wxString const &,unsigned short const *)" (??8@YA_NABVwxString@@PBG@Z)
helpers.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::wxString(unsigned short const *)" (__imp_??0wxString@@QAE@PBG@Z) referenced in function "public: static class wxString __cdecl wxPyApp::GetMacHelpMenuTitleName(void)" (?GetMacHelpMenuTitleName@wxPyApp@@SA?AVwxString@@XZ)
_core_wrap.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::wxString(unsigned short const *)" (__imp_??0wxString@@QAE@PBG@Z) referenced in function _init_core_
helpers.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const * const wxEmptyString" (__imp_?wxEmptyString@@3PBGB) referenced in function "public: static class wxString __cdecl wxPyApp::GetMacHelpMenuTitleName(void)" (?GetMacHelpMenuTitleName@wxPyApp@@SA?AVwxString@@XZ)
_core_wrap.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const * const wxEmptyString" (__imp_?wxEmptyString@@3PBGB) referenced in function _init_core_
helpers.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: unsigned short * __thiscall wxString::GetWriteBuf(unsigned int)" (__imp_?GetWriteBuf@wxString@@QAEPAGI@Z) referenced in function "class wxString * __cdecl wxString_in_helper(struct _object *)" (?wxString_in_helper@@YAPAVwxString@@PAU_object@@@Z)
helpers.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: unsigned short __thiscall wxString::GetChar(unsigned int)const " (__imp_?GetChar@wxString@@QBEGI@Z) referenced in function "bool __cdecl wxColour_helper(struct _object *,class wxColour * *)" (?wxColour_helper@@YA_NPAU_object@@PAPAVwxColour@@@Z)
helpers.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl wxString::Printf(unsigned short const *,...)" (__imp_?Printf@wxString@@QAAHPBGZZ) referenced in function "bool __cdecl wxPyTwoIntItem_helper<class wxSize>(struct _object *,class wxSize * *,unsigned short const *)" (??$wxPyTwoIntItem_helper@VwxSize@@@@YA_NPAU_object@@PAPAVwxSize@@PBG@Z)
_core_wrap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __cdecl wxString::Printf(unsigned short const *,...)" (__imp_?Printf@wxString@@QAAHPBGZZ)
helpers.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssert(unsigned short const *,int,unsigned short const *,unsigned short const *)" (?OnAssert@wxAppConsole@@UAEXPBGH00@Z)
helpers.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall wxApp::Initialize(int &,unsigned short * *)" (?Initialize@wxApp@@UAE_NAAHPAPAG@Z)
helpers.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall wxAppConsole::OnAssertFailure(unsigned short const *,int,unsigned short const *,unsigned short const *,unsigned short const *)" (__imp_?OnAssertFailure@wxAppConsole@@UAEXPBGH000@Z) referenced in function "public: virtual void __thiscall wxPyApp::OnAssertFailure(unsigned short const *,int,unsigned short const *,unsigned short const *,unsigned short const *)" (?OnAssertFailure@wxPyApp@@UAEXPBGH000@Z)
helpers.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl wxLogDebug(unsigned short const *,...)" (__imp_?wxLogDebug@@YAXPBGZZ) referenced in function "public: virtual void __thiscall wxPyApp::OnAssertFailure(unsigned short const *,int,unsigned short const *,unsigned short const *,unsigned short const *)" (?OnAssertFailure@wxPyApp@@UAEXPBGH000@Z)
helpers.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class wxString & __thiscall wxString::operator<<(unsigned short const *)" (__imp_??6wxString@@QAEAAV0@PBG@Z) referenced in function "public: virtual void __thiscall wxPyApp::OnAssertFailure(unsigned short const *,int,unsigned short const *,unsigned short const *,unsigned short const *)" (?OnAssertFailure@wxPyApp@@UAEXPBGH000@Z)
helpers.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class wxString & __thiscall wxString::operator+=(unsigned short const *)" (__imp_??YwxString@@QAEAAV0@PBG@Z) referenced in function "struct _object * __cdecl wxPyMake_wxObject(class wxObject *,bool,bool)" (?wxPyMake_wxObject@@YAPAU_object@@PAVwxObject@@_N1@Z)
helpers.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class wxStringBase & __thiscall wxStringBase::operator=(unsigned short const *)" (__imp_??4wxStringBase@@QAEAAV0@PBG@Z) referenced in function "struct _object * __cdecl wxPyMake_wxObject(class wxObject *,bool,bool)" (?wxPyMake_wxObject@@YAPAU_object@@PAVwxObject@@_N1@Z)
_core_wrap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class wxStringBase & __thiscall wxStringBase::operator=(unsigned short const *)" (__imp_??4wxStringBase@@QAEAAV0@PBG@Z)
_core_wrap.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned long __cdecl wxStringHash::wxCharStringHash(unsigned short const *)" (__imp_?wxCharStringHash@wxStringHash@@SAKPBG@Z) referenced in function "protected: static unsigned int __cdecl wxPyTypeInfoHashMap_wxImplementation_HashTable::GetBucketForNode(class wxPyTypeInfoHashMap_wxImplementation_HashTable *,struct wxPyTypeInfoHashMap_wxImplementation_HashTable::Node *)" (?GetBucketForNode@wxPyTypeInfoHashMap_wxImplementation_HashTable@@KAIPAV1@PAUNode@1@@Z)
_core_wrap.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall wxColourBase::FromString(unsigned short const *)" (?FromString@wxColourBase@@MAE_NPBG@Z)
_core_wrap.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class wxString & __thiscall wxString::Append(unsigned short const *)" (__imp_?Append@wxString@@QAEAAV1@PBG@Z) referenced in function "struct swig_type_info * __cdecl wxPyFindSwigType(unsigned short const *)" (?wxPyFindSwigType@@YAPAUswig_type_info@@PBG@Z)
_core_wrap.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const * const wxPanelNameStr" (__imp_?wxPanelNameStr@@3QBGB) referenced in function _$E54
_core_wrap.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const * const wxControlNameStr" (__imp_?wxControlNameStr@@3QBGB) referenced in function _$E60
wx\_core_.pyd : fatal error LNK1120: 19 unresolved externals
error: command '"c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe"' failed with exit status 1120