I have been having some trouble building an old version of SIP. I am building for:

Windows 7
python2.7
SIP 4.19.3

I am following the instructions here: How to install SIP & PyQT on windows 7

So I run configure.py and this gives me the makefile. I inited the env with vcvarsall.bat then run nmake. Then I get the linker error:

link /NOLOGO /DYNAMICBASE /NXCOMPAT /DLL /MANIFEST /MANIFESTFILE:sip.pyd.manifest /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /OUT:sip.pyd @C:\Users\jspada\AppData\Local\Temp\nm5CC3.tmp python27.lib(python27.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.EXE"' : return code '0x458' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2' Stop.

I attempted to init the env using both
vcvarsall.bat x86 and vcvarsall.bat x64 and build but get the same errors regardless.

I am not familiar with building on windows so I am a bit stuck even after browsing the other question on stack. Any ideas?

Thanks!

1

There are 1 best solutions below

0
On

I feel stupid! Make sure you have the right version of python installed. When you install from the site it will grab the 64 bit version instead of the 32. Had the 64 bit version installed and although I have a 64 bit system, the sip source is for 32.

Uninstalling python x64 and reinstalling python x32 fixed the issues and was able to nmake + nmake install