Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ifilipis opened this issue Jan 17, 2022 · 17 comments
Closed

Comments

@ifilipis
Copy link

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?

@jk4011
Copy link

jk4011 commented Jan 17, 2022

Please look at #18

@ifilipis
Copy link
Author

Please look at #18

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

@jk4011
Copy link

jk4011 commented Jan 17, 2022

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

@ifilipis
Copy link
Author

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

I have a different issue that this

@Tom94 Tom94 changed the title Build error on Windows Build problem on Windows: No known features for CXX compiler "MSVC" Jan 17, 2022
@WXuanyang
Copy link

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

@WXuanyang
Copy link

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

@mhalber
Copy link

mhalber commented Jan 18, 2022

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.

@ifilipis
Copy link
Author

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!

@Ricky-Millar
Copy link

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

@TheUniquePaulSmith
Copy link

image

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

Same here

@yuse94
Copy link

yuse94 commented Mar 27, 2022

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

@ciwolsey
Copy link

ciwolsey commented Apr 1, 2022

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.

@koktavy
Copy link
Contributor

koktavy commented Apr 15, 2022

@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?

@erich666
Copy link

erich666 commented Jun 17, 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).

@wowo0709
Copy link

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!

@Aimarl0
Copy link

Aimarl0 commented Nov 4, 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).

worked for me! Thanks!

@DmitriGoloubentsev
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests