Home > Back-end >  Under Linux relies on third-party libraries generate your own dynamic library, then g compiler calls
Under Linux relies on third-party libraries generate your own dynamic library, then g compiler calls

Time:01-02

I rely on a financial analysis library QuantLib generate your library QuantPlus, QuantLib and my own QuantPlus are dependent on the boost library, I use cmake generated two a libQuantLib. So and libQuantPlus. So are installed in/usr/local/lib, and then use the g + + compiler test file to quote for the 'boost: : re_detail... 'undefined reference, such as errors,


I compile command is: g + + -o test test02. CPP - lQuantLib - lQuantPlus - I/usr/local/QuantPlus/QuantPlus


Error://usr/local/lib/libQuantPlus. So: to "boost: : match_results & lt; __gnu_cxx: : __normal_iterator & lt; , char * const STD: : __cxx11: : basic_string & lt; Char, STD: : char_traits & lt; char> , STD: : allocator> , STD: : allocator , STD: : allocator>> (boost: : : : maybe_assign match_results & lt; __gnu_cxx: : __normal_iterator & lt; , char * const STD: : __cxx11: : basic_string & lt; Char, STD: : char_traits & lt; char> , STD: : allocator> , STD: : allocator , STD: : allocator>> Const&) Undefined reference to '
//usr/local/lib/libQuantPlus. So: to "boost: : re_detail_107500: : verify_options (unsigned int, boost: : regex_constants: : _match_flags) 'undefined reference
//usr/local/lib/libQuantPlus. So: to "boost: : re_detail_107500: : get_mem_block () 'undefined reference
//usr/local/lib/libQuantPlus. So: to "boost: : re_detail_107500: : get_default_error_string (boost: : regex_constants: : error_type) 'undefined reference
//usr/local/lib/libQuantPlus. So: to "boost: : basic_regex & lt; Char, boost: : regex_traits & lt; Char, boost: : cpp_regex_traits & lt; char>> : : do_assign (char const *, char * const, unsigned int) 'undefined reference
//usr/local/lib/libQuantPlus. So: the 'boost: : re_detail_107500: : cpp_regex_traits_implementation & lt; char> : : transform_primary (char const *, char const *) const undefined reference to '
//usr/local/lib/libQuantPlus. So: to "boost: : re_detail_107500: : put_mem_block undefined reference to (void *) '
//usr/local/lib/libQuantPlus. So: the 'boost: : re_detail_107500: : cpp_regex_traits_implementation & lt; char> : : transform (char const *, char const *) const undefined reference to '
//usr/local/lib/libQuantPlus. So: to "boost: : re_detail_107500: : raise_runtime_error (STD: : runtime_error const&) Undefined reference to '
//usr/local/lib/libQuantPlus. So: the 'boost: : re_detail_107500: : perl_matcher & lt; __gnu_cxx: : __normal_iterator & lt; , char * const STD: : __cxx11: : basic_string & lt; Char, STD: : char_traits & lt; char> , STD: : allocator> , STD: : allocator , STD: : allocator>> The boost: : regex_traits & lt; Char, boost: : cpp_regex_traits & lt; char>> (boost: : : : construct_init basic_regex & lt; Char, boost: : regex_traits & lt; Char, boost: : cpp_regex_traits & lt; char>> Const& , boost: : regex_constants: : _match_flags) undefined reference to '
Collect2: error: ld returned 1 exit status

CodePudding user response:

Bosses, please help to look at, is my generation libQuantPlus. So the library has a problem or problems in the g + + compiler
  • Related