zrax / pycdc

C++ python bytecode disassembler and decompiler
GNU General Public License v3.0
3.38k stars 645 forks source link

failing to build pycdc #484

Closed merasmus44 closed 6 months ago

merasmus44 commented 6 months ago

when i run cmake . on windows it gives me the error:

-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:2 (project):
  Running

   'nmake' '-?'

  failed with:

   no such file or directory

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
TiZCrocodile commented 6 months ago

its not giving me the error, its probably a problem of yours, try updating to latest cmake version maybe it would fix it.

greenozon commented 6 months ago

@merasmus44 what cmake version do you use?

cmake --version

2) what compiler do you use? if VisualStudio then cmake should find it and use it, eg:

C:\Dev\pycdc-master-2024\pycdc-master>cmake .
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.20348.0 to target Windows 6.1.7601.
-- The C compiler identification is MSVC 19.29.30154.0
-- The CXX compiler identification is MSVC 19.29.30154.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
....
merasmus44 commented 6 months ago

cmake version 3.29.3. I do have visual studio 2022 installed, but cmake can't seem to find it despite it being in my PATH

greenozon commented 6 months ago

try to help cmake find VS eg: cmd.exe vcvars.bat cmake .

merasmus44 commented 6 months ago

it compiled, thanks!

greenozon commented 6 months ago

@merasmus44 great news 🎉 ! feel free to close the issue