How to fix "created with an older compiler than other objects" build error?


Sync the trunk code, then:

python script\ -v --target_arch=ia32
python script\
Got the following error:
FAILED: D:\Python27\python.exe gyp-win-tool link-with-manifests environment.x86 True node.dll “D:\Python27\python.exe gyp-win-tool link-wrapper environment.x86 False link.exe /nologo /IMPLIB:node.dll.lib /DLL /OUT:node.dll @node.dll.rsp” 2 mt.exe rc.exe “obj\vendor\node\node_lib.node.dll.intermediate.manifest” obj\vendor\node\node_lib.node.dll.generated.manifest
fatal error C1047: The object or library file ‘obj\vendor\node\src\node_lib.async_wrap.obj’ was created with an older compiler than other objects; rebuild old objects and libraries
LINK : fatal error LNK1257: code generation failed

Python is 2.7 and vs version is 2017. OS is Win10 64bit.

How to fix it?


I encountered the same problem.

Do not use vs2017, electron and libchromiumcontent to compile with vs2015