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

Windows build fails with new JSON conversion #793

Closed
tony-p opened this issue Mar 26, 2024 · 1 comment
Closed

Windows build fails with new JSON conversion #793

tony-p opened this issue Mar 26, 2024 · 1 comment

Comments

@tony-p
Copy link
Contributor

tony-p commented Mar 26, 2024

From my research the failing build is maybe due to MSVC not conforming to the C++ standard

https://www.reddit.com/r/cpp_questions/comments/4agiol/avoiding_ambiguous_symbol_error_in_msvc_gcc/

C:\Users\me\BehaviorTree.CPP\include\behaviortree_cpp\json_export.h(104,5): error C2872: 'to_json': ambiguous symbol [C:\Users\me\BehaviorTree.CPP\build\examples\t12_groot_howto.vcxproj]
  (compiling source file '../../examples/t12_groot_howto.cpp')
  C:\Users\me\BehaviorTree.CPP\examples\t12_groot_howto.cpp(24,1):
  could be 'void to_json(nlohmann::json_abi_v3_11_2::json &,const Position2D &,bool)'
  C:\Users\me\BehaviorTree.CPP\include\behaviortree_cpp\contrib\json.hpp(6387,5):
  or       'const T &nlohmann::json_abi_v3_11_2::to_json'
          with
          [
              T=nlohmann::json_abi_v3_11_2::detail::to_json_fn
          ]
  C:\Users\me\BehaviorTree.CPP\include\behaviortree_cpp\json_export.h(104,5):
  the template instantiation context (the oldest one first) is
        C:\Users\me\BehaviorTree.CPP\examples\t12_groot_howto.cpp(106,7):
        see reference to function template instantiation 'void BT::RegisterJsonDefinition<Position2D>(void)' being compiled
        C:\Users\me\BehaviorTree.CPP\include\behaviortree_cpp\json_export.h(130,22):
        see reference to function template instantiation 'void BT::JsonExporter::addConverter<T>(void)' being compiled
          with
          [
              T=Position2D
          ]

C:\Users\me\BehaviorTree.CPP\include\behaviortree_cpp\json_export.h(111,5): error C2872: 'from_json': ambiguous symbol [C:\Users\me\BehaviorTree.CPP\build\examples\t12_groot_howto.vcxproj]
  (compiling source file '../../examples/t12_groot_howto.cpp')
  C:\Users\me\BehaviorTree.CPP\examples\t12_groot_howto.cpp(24,1):
  could be 'void from_json(const nlohmann::json_abi_v3_11_2::json &,Position2D &)'
  C:\Users\me\BehaviorTree.CPP\include\behaviortree_cpp\contrib\json.hpp(5642,5):
  or       'const T &nlohmann::json_abi_v3_11_2::from_json'
          with
          [
              T=nlohmann::json_abi_v3_11_2::detail::from_json_fn
          ]
@facontidavide
Copy link
Collaborator

fixed

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

2 participants