Hi All
I am wanting to use wxPython from python 2.7.2 which is embedded in my
application. My application with the python embedded in it (as well as
python) are built using MS Visual C++ Express 2010 using the Windows SDK
7.1 64-bit compilers. As the wxPython binaries are using VS2008
targeting python also built on vs2008, these do not import successfully
into my version of python. I have thus downloaded the wxPython.2.8.12
source code, and have been following instructions as posted here
http://wxpython.org/BUILD-2.8.html with theaddition of setting the
VS90COMNTOOLS environment variable which python searches for (despite
being built with VS2010). The wxWidgets libraries appear to build OK
(command: nmake -f makefile.vc OFFICIAL_BUILD=1 SHARED=1 MONOLITHIC=1
USE_OPENGL=1 USE_GDIPLUS=1 DEBUG_FLAG=1 CXXFLAGS=/D__NO_VC_CRTDBG__
WXDEBUGFLAG=h BUILD=release) but the python setup step (command: python
setup.py build_ext --inplace MONOLITHIC=1) fails with the following errorwith unicode turned on:
_core_wrap.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) int g_isPainting" (__imp_?g_isPainting@@3HA)
referenced in function _wrap_new_PaintEvent
s:\temp\wxPython-src-2.8.12.1_secondBuild\wxPython\wx\_core_.pyd : fatal
error LNK1120: 5 unresolved externals
error: command '"C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\Bin\amd64\link.exe"' failed with exit status 1120
Are you sure that the unicode flags were turned on for both builds? What where the other 4 unresolved symbols mentioned in the error message?
i tried turning off unicode and rebuilding and got this error in the
python setup step:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64\cl.exe
/c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -D_WINDOWS -D__WXMSW__
-DWXUSINGDLL=1 -DSWIG_TYPE_TABLE=_wxPython_table
-DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -DISOLATION_AWARE_ENABLED
-UNDEBUG -D__NO_VC_CRTDBG__ -D__WXDEBUG__ -DwxUSE_UNICODE=1 -Iinclude
-Isrc-Is:\temp\wxPython-src-2.8.12.1\lib\vc_dll\mswuh
-Is:\temp\wxPython-src-2.8.12.1\include
-Is:\temp\wxPython-src-2.8.12.1\contrib\include
-Is:\SwDev_libs_vc10_64\Python-2.7.2\include
-Is:\SwDev_libs_vc10_64\Python-2.7.2\PC /Tpsrc/helpers.cpp
/Fobuild.unicode\temp.win-amd64-2.7\Release\src/helpers.obj /Gy /EHsccl
: Command line warning D9025 : overriding '/DNDEBUG' with '/UNDEBUG'
helpers.cpp
s:\temp\wxPython-src-2.8.12.1\include\wx/platform.h(196) : fatal error
C1083: Cannot open include file: 'wx/setup.h': No such file or directory
error: command '"C:\Program Files(x86)\Microsoft Visual Studio
10.0\VC\Bin\amd64\cl.exe"' failed with exit status 2
Does s:\temp\wxPython-src-2.8.12.1\lib\vc_dll\mswuh exist? That is where it should be finding wx/setup.h. If that folder doesn't exist then you probably didn't actually make the unicode build of wxWidgets. (The 'u' in the folder name is for unicode.)
···
On 9/26/12 2:56 AM, Stephen Haddad wrote:
--
Robin Dunn
Software Craftsman