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

Unable to build example https://github.com/BehaviorTree/btcpp_sample #548

Open
MatteoAlbi opened this issue Apr 19, 2023 · 0 comments
Open

Comments

@MatteoAlbi
Copy link

I'm trying to build the basic example to "use BT.CPP in your application" : https://github.com/BehaviorTree/btcpp_sample
My folder structure is the following:

BTcpp_test
    |- BehaviorTree.CPP
        |- ... preexisting files and directories
        |- build
    |- installdir
        |- bin
            |- bt3_log_cat
            |- bt3_plugin_manifest
        |- include/behaviortree_cpp/... all header files
            |- cmake/behaviortree_cpp
                |- behaviortree_cppConfig.cmake
                |- behaviortree_cppTargets-release.cmake
                |- behaviortree_cppTargets.cmake
            |- libbehaviortree_cpp.so
    |- test
        |- build
        |- CMakeLists.txt
        |- main.cpp
  • The folder BTcpp_test/BehaviorTree.CPP/build is used to build the library using conan using the commands provided in the README.md.
  • The folder BTcpp_test/installdir is where the package is then installed using the command cmake --install . --prefix "../../installdir" from inside the folder BTcpp_test/BehaviorTree.CPP/build.
  • BTcpp_test/test/build is used to build the example by running cmake -S . -B build; make -C build inside the folder BTcpp_test/test
  • BTcpp_test/test/CMakeLists.txt is copied-pasted from the example, and then I added list(APPEND CMAKE_PREFIX_PATH "/home/albi_mt/projects/BTcpp_test/installdir") to "include" the installation directory of the package.
  • BTcpp_test/test/main.cpp is copied-pasted from the example

When I try to configure the building of the example, no error rises. However, when I try to build it, a sequence of errors rise stating that all function calls result in undefined reference. It seems no source files are linked to the library.
Am I missing some steps or there is a problem in the CMakeLists.txt?

P.S.
I can't receive any confirmation email to activate an account on the forum https://discourse.behaviortree.dev/

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

1 participant