我无法在我的笔记本电脑上编译assimp(Windows 10,Visual Studio 2017社区)。在我的工作PC上,一切都很好。
我只是克隆回购:
git clone https://github.com/assimp/assimp.git
cd assimp
mkdir build
cd build
cmake ..
这里有cmake命令
-- Building for: Visual Studio 15 2017
-- The C compiler identification is MSVC 19.14.26428.1
-- The CXX compiler identification is MSVC 19.14.26428.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Shared libraries enabled
-- Looking for DirectX...
-- DirectX_PREFIX_PATH changed.
-- Could not locate DirectX
-- Looking for ZLIB...
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could not locate ZLIB
-- compiling zlib from souces
CMake Deprecation Warning at contrib/zlib/CMakeLists.txt:8 (cmake_policy):
The OLD behavior for policy CMP0048 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find rt (missing: RT_LIBRARY)
-- Enabled formats: AMF 3DS AC ASE ASSBIN ASSXML B3D BVH COLLADA DXF CSM HMP IRRMESH IRR LWO LWS MD2 MD3 MD5 MDC MDL NFF NDO OFF OBJ OGRE OPENGEX PLY MS3D COB BLEND IFC XGL FBX Q3D Q3BSP RAW SIB SMD STL TERRAGEN 3D X X3D GLTF 3MF MMD
-- Disabled formats:
-- Could NOT find IL (missing: IL_LIBRARIES IL_INCLUDE_DIR)
CMake Warning at CMakeLists.txt:439 (MESSAGE):
Build of assimp_qt_viewer is disabled. Unsatisfied dendencies: Qt5 DevIL
-- Configuring done
-- Generating done
-- Build files have been written to:
这为我的Visual Studio提供了解决方案,我正在尝试使用Build All菜单构建。我收到以下错误:
Severity Code Description Project File Line Suppression State
Error C2065 'AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE': undeclared identifier assimp
Error (active) E0020 identifier "AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY" is undefined assimp
Error C2065 'AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY': undeclared identifier assimp
但是如果我尝试导航到这个定义 - Intellisense允许我这样做。我看到这个定义。我做错了什么,请帮忙吗?