fix exchange module batch builds
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
This patch resolves issues building the exchange module for 32-bit and 64-bit builds using the project batch build scripts. 64-bit builds now also include dummy functions that will raise a NotImplementedError
for all of the unsupported 32-bit ExchangeSDK functions.
This patch also reverts some changes to setup.py
introduced in [#124] that are no longer used.
Thanks to Mark for all of his help and suggestions to create this patch.
Building the exchange module requires installation of the Microsoft Exchange 2003 SDK
Old Patches - new patches via https://github.com/mhammond/pywin32/pulls: #124
Sadly I can't make this work. I installed the new SDK and while 32bit builds work, the 64bit builds fail with unresolved externals for the UUIDs:
Creating library build\temp.win-amd64-2.7\Release\com/win32comext/mapi/src\exchange.lib and objec
t build\temp.win-amd64-2.7\Release\com/win32comext/mapi/src\exchange.exp
mapiutil.obj : error LNK2001: unresolved external symbol IID_IProfSect
mapiutil.obj : error LNK2001: unresolved external symbol IID_IMAPIStatus
mapiutil.obj : error LNK2001: unresolved external symbol IID_IABContainer
mapiutil.obj : error LNK2001: unresolved external symbol IID_IDistList
mapiutil.obj : error LNK2001: unresolved external symbol IID_IMailUser
mapiutil.obj : error LNK2001: unresolved external symbol IID_IAttachment
mapiutil.obj : error LNK2001: unresolved external symbol IID_IMessage
build\lib.win-amd64-2.7\win32comext/mapi\exchange.pyd : fatal error LNK1120: 7 unresolved externals
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\link.exe"' failed with exit status 1120
Note that setup.py includes the block:
but it's not clear there are 64bit libs in that sdk. I'm out of time to dig further. I've attached the patch rebased against current tip.
I seemed to have been behind for some reason when I cloned, so I had to manually resolve the patch. Of course I didn't realize until much later that I was simply missing [#158]. However, I don't think that should have affected my build result being different.
That said, I also originally failed building. Except I failed on the
exchdapi
module instead. The only change I needed to make for a successful build was:The fact that you are able to build the 32-bit version and only failing on the 64-bit
exchange
module leaves me puzzled as well.Related
Old Patches - new patches via https://github.com/mhammond/pywin32/pulls:
#158