Re: Linking error while separating parser into _def and .cpp files
Larry Evans <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 11/08/2016 01:13 PM, Exagon wrote: > I am currently trying to separate my parser inteo different files using > BOOST_SPIRIT_DEFIND/DECLAR/INSTATIATE, but I keep getting a linker error. > I dont know what I am doing wrong, or if I am doing something wrong. > Could anybody help me? > HERE <http://melpon.org/wandbox/permlink/iSEDrjYf14SvKKWe> is a smal > example, where I get the linker error. > Greetings Exagon > Exagon, FWIW, I'm getting a similar error about parse_rule being undefined; however, mine is with the code which Peter Gerell uploaded here: https://github.com/pgerell/boost_1_61_problem I'm trying to figure out why. However, Peter indicates he had to problem with 1.60.0 but only with 1.61.1. The mystery deepens ;( Anyway, my link error includes: --[--cut here-- /tmp/build/clangxx3_8_pkg/clang/dwnlds_work/dwnlds/Gerell.Boost_1_61_Spirit.LinkError.clone/boost_1_61_problem/common.o: In function `bool boost::spirit::x3::rule<count_class, ast::Count, false>::parse<std::__1::__wrap_iter<char const*>, boost::spirit::x3::unused_type, ast::Start>(std::__1::__wrap_iter<char const*>&, std::__1::__wrap_iter<char const*> const&, boost::spirit::x3::unused_type const&, boost::spirit::x3::unused_type, ast::Start&) const': common.cpp:(.text._ZNK5boost6spirit2x34ruleI11count_classN3ast5CountELb0EE5parseINSt3__111__wrap_iterIPKcEENS1_11unused_typeENS4_5StartEEEbRT_RKSF_RKT0_SD_RT1_[_ZNK5boost6spirit2x34ruleI11count_classN3ast5CountELb0EE5parseINSt3__111__wrap_iterIPKcEENS1_11unused_typeENS4_5StartEEEbRT_RKSF_RKT0_SD_RT1_]+0x3c): undefined reference to `bool parse_rule<std::__1::__wrap_iter<char const*>, boost::spirit::x3::unused_type, ast::Start>(boost::spirit::x3::rule<count_class, ast::Count, false>, std::__1::__wrap_iter<char const*>&, std::__1::__wrap_iter<char const*> const&, boost::spirit::x3::unused_type const&, ast::Start&)' clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation) --}--cut here-- ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi