dilevin / computer-graphics-raster-images

Computer Graphics Assignment about Raster Images
2 stars 10 forks source link

CMake Error #60

Open elinsooon opened 2 months ago

elinsooon commented 2 months ago

After creating the build directory and trying to run "cmake ..", I get the following error:

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!

I've tried a number of things to try and get cmake to recognize nmake but nothing seems to be working. I'm using Visual Studio 22. Is there some sort of troubleshooting sequence I should try? Or has anyone run into this issue and knows how to solve it?

Thanks!

kevinchung2312 commented 2 months ago

Hi, I had the same problem. If you've downloaded the compilers and nmake correctly, try adding the compiler paths and nmake path to the environment setting. This worked for me.

dilevin commented 2 months ago

You can also try using the Visual Studio Developer Command Prompt which has all these variables set by default: https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022