google / usd_from_gltf

Apache License 2.0
550 stars 86 forks source link

i am getting 'std::map': too few template arguments error while compiling on windows #84

Closed kkbandaru closed 3 years ago

kkbandaru commented 3 years ago

i am getting 'std::map': too few template arguments error while compiling on windows

..\process/mesh.h(57,25): error C2976: 'std::map': too few template arguments [..\build\usd_from_gltf\process\process.vcxproj] ..\include\boost-1_70\boost/detail/container_fwd.hpp(136): message : see declaration of 'std::map' [..\process\process.vcxproj]

timknip commented 3 years ago

Same here. Win10, VS2017


  USD_FROM_GLTF: Run: cmake --build . --config Release --target install -- /m
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  gltf.vcxproj -> D:\ufg_build\build\usd_from_gltf\gltf\Release\gltf.lib
  config.cc
  logging.cc
  Generating Code...
  common.vcxproj -> D:\ufg_build\build\usd_from_gltf\common\Release\common.lib
  Building Custom Rule D:/github/google/usd_from_gltf/process/CMakeLists.txt
  math.cc
  mesh.cc
D:\github\google\usd_from_gltf\process\..\process/mesh.h(56): error C2976: 'std::map': too few template arguments [D:\ufg_build\build\usd_from_gltf\process\process.vcxproj]
  C:\USD\include\boost/detail/container_fwd.hpp(136): note: see declaration of 'std::map'
D:\github\google\usd_from_gltf\process\..\process/mesh.h(61): error C2079: 'ufg::PrimInfo::uvs' uses undefined class 'std::map' [D:\ufg_build\build\usd_from_gltf\process\process.vcxproj]
D:\github\google\usd_from_gltf\process\mesh.cc(273): error C2109: subscript requires array or pointer type [D:\ufg_build\build\usd_from_gltf\process\process.vcxproj]
D:\github\google\usd_from_gltf\process\mesh.cc(427): error C2789: 'uv_found': an object of const-qualified type must be initialized [D:\ufg_build\build\usd_from_gltf\process\process.vcxproj]
  D:\github\google\usd_from_gltf\process\mesh.cc(427): note: see declaration of 'uv_found'
D:\github\google\usd_from_gltf\process\mesh.cc(428): error C3536: 'uv_found': cannot be used before it is initialized [D:\ufg_build\build\usd_from_gltf\process\process.vcxproj]
D:\github\google\usd_from_gltf\process\mesh.cc(436): error C2109: subscript requires array or pointer type [D:\ufg_build\build\usd_from_gltf\process\process.vcxproj]
  process_util.cc
  skin.cc
D:\github\google\usd_from_gltf\process\..\process/mesh.h(56): error C2976: 'std::map': too few template arguments [D:\ufg_build\build\usd_from_gltf\process\process.vcxproj]
  C:\USD\include\boost/detail/container_fwd.hpp(136): note: see declaration of 'std::map'
D:\github\google\usd_from_gltf\process\..\process/mesh.h(61): error C2079: 'ufg::PrimInfo::uvs' uses undefined class 'std::map' [D:\ufg_build\build\usd_from_gltf\process\process.vcxproj]
  animation.cc
  color.cc
  float_image.cc
  image.cc
  image_fallback.cc
  image_gif.cc
  image_jpg.cc
  image_png.cc
  Generating Code...

  USD_FROM_GLTF: ERROR: Command failed: cmake --build . --config Release --target install -- /m
  USD_FROM_GLTF: See log at: d:\ufg_build\build\usd_from_gltf\log.txt```
timknip commented 3 years ago

When I apply the pull request https://github.com/google/usd_from_gltf/pull/82 I managed to compile.

Also needed to add #include <map> to https://github.com/google/usd_from_gltf/blob/master/process/mesh.h#L21 to fix the error C2976: 'std::map': too few template argument error.