Ask Your Question
0

When my C++ project is used as a submodule, it loses the ability to locate the Boost library which it needs.

asked 2023-05-23 18:57:27 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-05-23 19:23:02 +0000

devzero gravatar image

There are a few possible solutions to this problem:

  1. Make sure that Boost is installed on the system where the submodule is being used. This may require the user to manually install Boost if it is not already available on their system.

  2. Modify the CMake or Makefile for the submodule to include the path to the Boost library. This can be done by setting the BoostINCLUDEDIR and BoostLIBRARYDIR variables in CMake, or by modifying the LIBRARY_PATH environment variable in a Makefile.

  3. Add the Boost library as a dependency in the parent project's build system. This will ensure that the Boost library is available to all submodules that require it.

  4. Include the Boost library as part of the submodule's code repository. This may not be desirable if the Boost library is large and unnecessary for users who do not need it.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-23 18:57:27 +0000

Seen: 9 times

Last updated: May 23 '23