gdabah / distorm

Powerful Disassembler Library For x86/AMD64
Other
1.26k stars 238 forks source link

Unable to build distorm 3.3.8 on Windows 10 with both Visual Studio 2015 and 2017 installed #128

Closed justfalter closed 5 years ago

justfalter commented 5 years ago

I'm having trouble getting distorm 3.3.8 to build on Windows 10. I've got both Visual Studio 2015 and 2017 installed. When I run python setup.py build, I get the output you see in the gist, here.

The chief complaint seems to be:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [D:\code\distorm\make\win32\cdistorm.vcxproj]

The only VS related variable I have when building is:

VS140COMNTOOLS=D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\

Trying to get it to build within a Visual Studio 2017 dev environment doesn't work, either, as it appears that setup.py makes some assumptions about the location of vcvarsall.bat that are not true under VS 2017.

gdabah commented 5 years ago

@justfalter Well it seems the answer is in your question, retarget the solution. Do you have VS? Or just the build?

Otherwise it seems to me you will have to edit the vcxproj to use another toolset that is relevant for 2015 or 2017 which should exist on your machine.

Let me know.

gdabah commented 5 years ago

I think the problem is that it uses the wrong VS version 14 and not 17. And that's why it won't work. Try deleting that envar and retry setup.py.