NVlabs/instant-ngp

Build problem on Windows: No known features for CXX compiler "MSVC"

ifilipis opened this issue ยท 17 comments

When running cmake . -B build I get

CMake Error in CMakeLists.txt:
No known features for CXX compiler

"MSVC"

version 19.29.30136.0.

What features is it missing? Where do I look for that?

Please look at #18

Please look at #18

It's a different one. I've found the solution for CUDA toolkit, too

This might help. mitsuba-renderer/mitsuba2#103 (comment)

I have a different issue that this

Got the same problem here, did you find a solution? I'm using MSVC 342 btw

Got the same problem here, did you find a solution? I'm using MSVC 342 btw

Hummm I reinstalled vs2019 and it somehow works, I don't know why but maybe you can also have a try

For whomever is encountering this problem:
Make sure you run a cmake in command line environment in which cl.exe can be found - if you have BuildTools installed, then Native Tools Command Prompt gives you this. Additionally, make sure to remove any previous cmake cache.

if you have BuildTools installed, then Native Tools Command Prompt gives you this. Additionally, make sure to remove any previous cmake cache.

Yes! This worked!

Hey, still getting this same issue with a reinstall and trying Native Tools. not sure how to further troubleshoot.

image

Hey, still getting this same issue with a reinstall and trying Native Tools. not sure how to further troubleshoot.

Same here

image

Hey, still getting this same issue with a reinstall and trying Native Tools. not sure how to further troubleshoot.

Same here

I right clicked inside the folder where I needed to run the compiler and clicked show more options, and selected the option to open with Visual Studio. A folder called .vs was created run the command line and it worked

For anyone who still has issues after getting cl.exe into your path etc - make sure you remove the "build" directory before running cmake again.

@ciwolsey What should the cl.exe path entry look like? What is the location of the "build" folder, should it have been created inside the "instant-ngp" repo folder?

What should the cl.exe path entry look like? What is the location of the "build" folder, should it have been created inside the "instant-ngp" repo folder?

In case it's a help, I had the same error, evidently because Cmake tried to run Visual Studio 2022's compiler by default. I removed the "build" directory in GitHub\instant-ngp (which gets rid of the cached compiler settings), then did this in the Developer Command Prompt (for VS 2022, which might have been the wrong one to use...):

cmake . -B build -G "Visual Studio 16 2019"

followed by the usual:

cmake --build build --config RelWithDebInfo -j 16

This worked for me.

Also, you'll find the Developer Command Prompt executable in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2019\Visual Studio Tools" (or 2022).

What should the cl.exe path entry look like? What is the location of the "build" folder, should it have been created inside the "instant-ngp" repo folder?

In case it's a help, I had the same error, evidently because Cmake tried to run Visual Studio 2022's compiler by default. I removed the "build" directory in GitHub\instant-ngp (which gets rid of the cached compiler settings), then did this in the Developer Command Prompt (for VS 2022, which might have been the wrong one to use...):

cmake . -B build -G "Visual Studio 16 2019"

followed by the usual:

cmake --build build --config RelWithDebInfo -j 16

This worked for me.

Also, you'll find the Developer Command Prompt executable in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2019\Visual Studio Tools" (or 2022).

This worked for me! Thanks!

What should the cl.exe path entry look like? What is the location of the "build" folder, should it have been created inside the "instant-ngp" repo folder?

In case it's a help, I had the same error, evidently because Cmake tried to run Visual Studio 2022's compiler by default. I removed the "build" directory in GitHub\instant-ngp (which gets rid of the cached compiler settings), then did this in the Developer Command Prompt (for VS 2022, which might have been the wrong one to use...):

cmake . -B build -G "Visual Studio 16 2019"

followed by the usual:

cmake --build build --config RelWithDebInfo -j 16

This worked for me.

Also, you'll find the Developer Command Prompt executable in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2019\Visual Studio Tools" (or 2022).

worked for me! Thanks!

I had same error message, but none of the above helped me.
I used shared folder between linux and windows guest to store source tree. After I moved source to C:\ the problem went away. huh.