boostorg / boostorg/program_options
boost_program_options failed to link due to undefined references
- 主要言語
- C++
- スター
- 136
- フォーク
- 117
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
When building a program that uses boost::program_options a couple of undefined refereneces show up:
```
CMakeFiles/saryxo_train.dir/src/main.cpp.o: In Function »boost::program_options::basic_command_line_parser::basic_command_line_parser(int, char const* const*)«:
/usr/local/include/boost/program_options/detail/parsers.hpp:28: Warning: undefined reference to »boost::program_options::detail::cmdline::cmdline(std::__debug::vector, std::allocator >, std::allocator, std::allocator > > > const&)«
CMakeFiles/saryxo_train.dir/src/main.cpp.o:(.data.rel.ro._ZTVN5boost15program_options11typed_valueIicEE[_ZTVN5boost15program_options11typed_valueIicEE]+0x38): Warning: undefined reference to »boost::program_options::value_semantic_codecvt_helper::parse(boost::any&, std::__debug::vector, std::allocator >, std::allocator, std::allocator > > > const&, bool) const«
CMakeFiles/saryxo_train.dir/src/main.cpp.o:(.data.rel.ro._ZTVN5boost15program_options11typed_valueIjcEE[_ZTVN5boost15program_options11typed_valueIjcEE]+0x38): Warning: undefined reference to »boost::program_options::value_semantic_codecvt_helper::parse(boost::any&, std::__debug::vector, std::allocator >, std::allocator, std::allocator > > > const&, bool) const«
CMakeFiles/saryxo_train.dir/src/main.cpp.o:(.data.rel.ro._ZTVN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE[_ZTVN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE]+0x38): Warning: undefined reference to »boost::program_options::value_semantic_codecvt_helper::parse(boost::any&, std::__debug::vector, std::allocator >, std::allocator, std::allocator > > > const&, bool) const«
CMakeFiles/saryxo_train.dir/src/main.cpp.o: In Function »boost::program_options::typed_value, std::allocator >, char>::xparse(boost::any&, std::__debug::vector, std::allocator >, std::allocator, std::allocator > > > const&) const«:
/usr/local/include/boost/program_options/detail/value_semantic.hpp:184: Warning: undefined reference to »boost::program_options::validate(boost::any&, std::__debug::vector, std::allocator >, std::allocator, std::allocator > > > const&, std::__cxx11::basic_string, std::allocator >*, int)«
```
I am using CMake 3.14 and link boost in the CMake list like:
```
cmake_minimum_required(VERSION 3.14)
set (CMAKE_CXX_STANDARD 14)
find_package(Boost 1.70 COMPONENTS filesystem program_options REQUIRED)
...
target_link_libraries(project ${Boost_LIBRARIES})
```
*System Plattform: Ubuntu x86_64
CMake/GCC Version: 3.14/7.4.0
Boost Version: 1.71*
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Issue に示されている CMake 構成、特に find_package と target_link_libraries から始め、その後 GCC 7.4.0、CMake 3.14、Boost 1.71 を使用して Ubuntu x86_64 のビルドを再現します。boost::program_options を使用するプログラムが、報告されている undefined references なしでリンクできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cmake, cpp
- 領域
- build-system
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100