Skip to content

bt_factory.h uses nlohmann::json but does not include it #1034

@Kikadass

Description

@Kikadass

Describe the bug
bt_factory.h uses nlohmann::json but does not include it

I am getting error LNK2019 unresolved external symbol and fatal error LNK1120: 1 unresolved externals because I am trying to use bt_factory.h and I need to include nlohmann::json right before it, as bt_factory.h is not including it itself.

How to Reproduce*

Make a program where json is not used, include bt_factory.h and use parts of bt_factory.h. Such as the DecoratorNode, PortList, NodeConfig, NodeStatus and BehaviorTreeFactory.

Do not include nlohmann/json.hpp yourself. See the link error appear.
Only when including nlohmann/json.hpp right before the include bt_factory.h the linking error vanishes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions