简体   繁体   中英

Cannot build Open3D from source

I'm trying to build Open3D from source in c++. I have followed the method explained here , but when it enable the flag -DBUILD_SHARED_LIBS=ON I get this message:

CMake Error at 3rdparty/webrtc/webrtc_download.cmake:15 (message):
Pre-built WebRTC binaries are not available for BUILD_SHARED_LIBS=ON or
STATIC_WINDOWS_RUNTIME=OFF.  Please use (a) BUILD_WEBRTC=OFF or (b)
BUILD_SHARED_LIBS=OFF and STATIC_WINDOWS_RUNTIME=ON or (c)
BUILD_WEBRTC_FROM_SOURCE=ON

When I then disable BUILD_WEBRTC I'm able to generate the project. However, when I then try to build the INSTALL in visual studio I can the following error:

error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in Open3DConfig.obj

Hopefully someone knows how to fix this problem:)

According to the CMakeLists.txt for Open3D, when you set the BUILD_SHARED_LIBS=ON the following is also set:

if (BUILD_SHARED_LIBS)
  option(STATIC_WINDOWS_RUNTIME "Use static (MT/MTd) Windows runtime"      OFF)
else()
  option(STATIC_WINDOWS_RUNTIME "Use static (MT/MTd) Windows runtime"      ON )
endif()

Are you sure that you have the STATIC_WINDOWS_RUNTIME=OFF while still using BUILD_SHARED_LIBS=ON ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM