jeudi 13 janvier 2022

Cannot compile code in Rhel8. Boost program error

I am facing a boost compilation error in rhel8 host machine. My boost version is 1.66 and g++ version is g++ (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1). I am getting boost program options undefined reference error. i see boost library are in /usr/lib64 folder. Below are my make file and errors. Someone please help me to resolve this error.

Below is my make file content for boost

BOOST_INC = -I/usr/include/boost
BOOST_LIB_BASE = /usr/lib64
BOOST_THREAD_LIBS = -lboost_thread
$(info BOOST_THREAD_LIBS is  $(BOOST_THREAD_LIBS))
BOOST_LIB = -lboost_filesystem -lboost_regex -lboost_program_options -lboost_date_time -lboost_system
BOOST_LDFLAGS    = -L$(BOOST_LIB_BASE)

Error contents

/home/kevlar/lib/linux5_64_DBG/libkevlarcommandlinetools.a(KevlarCommandLineToolSet.o):(.data.rel.ro._ZTVN5boost15program_options11typed_valueISt6vectorISsSaISsEEcEE
[_ZTVN5boost15program_options11typed_valueISt6vectorISsSaISsEEcEE]+0x38): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::string, std::allocator<std::string> > const&, bool) const'

/home/kevlar/lib/linux5_64_DBG/libkevlarcommandlinetools.a(KevlarCommandLineToolSet.o):(.data.rel.ro._ZTVN5boost15program_options11typed_valueISscEE[_ZTVN5boost15program_options11typed_valueISscEE]+0x38): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::string, std::allocator<std::string> > const&, bool) const'  

/home/kevlar/lib/linux5_64_DBG/libkevlarcommandlinetools.a(KevlarCommandLineToolSet.o):(.data.rel.ro._ZTVN5boost15program_options20invalid_option_valueE[_ZTVN5boost15program_options20invalid_option_valueE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::string const&) const'

Aucun commentaire:

Enregistrer un commentaire