wxPython x64 build

6 views
Skip to first unread message

Casten

unread,
Aug 18, 2009, 7:44:38 PM8/18/09
to wxPython-dev
Hi folks,

I'm trying to build x64 wxPython. I downloaded the source for
2.8.10.1 and am trying to build with Visual Studio 2008 (VC9).

I haven't had much luck. Based on the build steps detailed at:
"http://www.wxpython.org/builddoc.php" I've created the following
batch file for use with the Windows Command Shell.

IF defined VCINSTALLDIR (
@echo vcvars already run
) ELSE (
call "%VS90COMNTOOLS%\..\..\VC\vcvarsall" x86_amd64
)
set wxwin=C:\Users\criepling\Desktop\testbuild\wxPython-src-2.8.10.1
set wxdir=%wxwin%
cd %WXDIR%\include\wx\msw
copy setup0.h setup.h
cd %WXDIR%\build\msw
nmake -f makefile.vc OFFICIAL_BUILD=1 SHARED=0; MONOLITHIC=0
USE_OPENGL=1 USE_GDIPLUS=1 CXXFLAGS=/D__NO_VC_CRTDBG__ BUILD=release
UNICODE=1 MSLU=1
cd %WXDIR%\wxPython
%WXDIR%\..\Python-2.6.2\PCbuild\amd64\python setup.py build_ext --
inplace MONOLITHIC=0 FINAL=1 HYBRID=1 UNICODE=1


I am getting lots of unresolved externals when linking the _core_
extension.

Some are from _core_wrap.obj such as:
_core_wrap.obj : error LNK2001: unresolved external symbol "__declspec
(dllimport) public: class wxClientData * __cdecl
wxClientDataContainer::GetClientObject(void)const " (__imp_?
GetClientObject@wxClientDataContainer@@QEBAPEAVwxClientData@@XZ)

Some are from wxbase28u.lib. e.g.:
wxbase28u.lib(baselib_zipstrm.obj) : error LNK2019: unresolved
external symbol deflateReset referenced in function "public: bool
__cdecl wxZlibOutputStream2::Open(class wxOutputStream &)" (?
Open@wxZlibOutputStream2@@QEAA_NAEAVwxOutputStream@@@Z)

And the remainders are wxmsw28u_core.lib:
wxmsw28u_core.lib(corelib_imagtiff.obj) : error LNK2019: unresolved
external symbol TIFFSetField referenced in function "public: virtual
bool __cdecl wxTIFFHandler::SaveFile(class wxImage *,class
wxOutputStream &,bool)" (?
SaveFile@wxTIFFHandler@@UEAA_NPEAVwxImage@@AEAVwxOutputStream@@_N@Z)

For a total of 167 unresolved externals.

Does anyone have any advice? It would be sincerely appreciated.

Thank you very much in advance.
-Casten

Robin Dunn

unread,
Aug 26, 2009, 7:29:21 PM8/26/09
to wxPyth...@googlegroups.com
Sorry to take so long to respond, I've been having trouble putting on my
win64-compiler-thinking-cap. ;-)

Casten wrote:
> Hi folks,
>
> I'm trying to build x64 wxPython. I downloaded the source for
> 2.8.10.1 and am trying to build with Visual Studio 2008 (VC9).
>
> I haven't had much luck. Based on the build steps detailed at:
> "http://www.wxpython.org/builddoc.php" I've created the following
> batch file for use with the Windows Command Shell.
>
> IF defined VCINSTALLDIR (
> @echo vcvars already run
> ) ELSE (
> call "%VS90COMNTOOLS%\..\..\VC\vcvarsall" x86_amd64
> )
> set wxwin=C:\Users\criepling\Desktop\testbuild\wxPython-src-2.8.10.1
> set wxdir=%wxwin%
> cd %WXDIR%\include\wx\msw
> copy setup0.h setup.h

Some of the settings in setup.h need to be changed or you may get some
errors or missing functionality.

> cd %WXDIR%\build\msw
> nmake -f makefile.vc OFFICIAL_BUILD=1 SHARED=0; MONOLITHIC=0

Use SHARED=1, otherwise you won't get DLLs and each extension module
will essentially have it's own copy of wx instead of sharing a single
instance of it.

> USE_OPENGL=1 USE_GDIPLUS=1 CXXFLAGS=/D__NO_VC_CRTDBG__ BUILD=release
> UNICODE=1 MSLU=1

It probably doesn't hurt anything to leave it turned on, but the MSLU
hack does not apply on 64-bit systems.

> cd %WXDIR%\wxPython
> %WXDIR%\..\Python-2.6.2\PCbuild\amd64\python setup.py build_ext --
> inplace MONOLITHIC=0 FINAL=1 HYBRID=1 UNICODE=1

Use either FINAL=1 or HYBRID=1, but not both.


>
>
> I am getting lots of unresolved externals when linking the _core_
> extension.

I'm guessing it is related to the SHARED=0 in your build. Either it is
trying to use an old set of DLL import libraries when linking, or it is
using the static libs but failing because the imported symbols are not
marked as exported.


--
Robin Dunn
Software Craftsman
http://wxPython.org

Reply all
Reply to author
Forward
0 new messages