VS2015+Cmake compile open3d

question:

After downloading the open3d source code, use CMAKE+VS2015 to compile according to the official instructions, but it appears during the configure process

The C compiler identification is unknown
The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:7 (PROJECT):
  No CMAKE_C_COMPILER could be found.



CMake Error at CMakeLists.txt:7 (PROJECT):
  No CMAKE_CXX_COMPILER could be found.

(The error message is probably like this, because there is no screenshot in advance)

Possible causes and solutions:

1. VS2015 does not install VC by default, you need to open the installer to modify it or create a new VC++ project in VS and follow the prompts to install the VC Package.

2. If you have installed VC and still cannot compile, you should enter the build directory to view the CMakeError.log log, which records the specific error reported that cannot be compiled.

    The log shows: ucrt.lib (probably called this) is missing, or cl.exe, rc.exe.

    In order to troubleshoot errors, the author has made the following attempts in many aspects. It is not known which one will take effect and is for reference only.

    1) Check whether the VC++ console project in VS2015 can be compiled and debugged. If not, repair it. Fixes include:

            i) Download dll from MS symbol server. Refer to  https://blog.csdn.net/sidely/article/details/49904807

            ii) Install Windows SDK 10. Address  https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk

    2) VS can execute VC++ programs normally, try to use VS command prompt to open CMake-GUI to compile. Because VS installation may not add environment variables to the system, CMAKE cannot find the compiler.

    3) If it still fails to compile, the author only encounters one situation, that is, the CMakeError.log prompts that rc.exe is missing, and copy the corresponding files in Windows SDK 10 to the VS directory. Reference  https://stackoverflow.com/questions/14372706/visual-studio-cant-build-due-to-rc-exe

successfully configure and generate

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324700366&siteId=291194637