Re: x3 linker error with separate TU

Larry Evans <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
On 05/27/2017 01:09 PM, Olaf Peter wrote:
> Hello Larry,
>> On 05/26/2017 03:44 PM, Larry Evans wrote:
>> [snip]
>>
>>> and I *guess* the attribute transform Seth talked about was that
>>> encapsulated in rule_attr_transform here:
>>>
>>> https://github.com/cppljevans/spirit/blob/get_rhs/include/boost/spirit/home/x3/nonterminal/detail/rule.hpp#L311 
>>>
>>>
>>> and where rule_attr_transform is done is governed by the macro:
>>>
>>>    BOOST_SPIRIT_DISABLE_RULE_ATTR_XFORM
>>>
>> OOPS.  That should be:
>>
>>   BOOST_SPIRIT_ATTR_XFORM_IN_RULE
>>
>> I've only a foggy memory of what BOOST_SPIRIT_DISABLE_RULE_ATTR_XFORM 
>> is for.  Maybe the get_rhs fork is not ready for pull request now :( 
> 
> thank you for your effort! I did clone your 
> https://github.com/cppljevans/spirit/tree/get_rhs into the sources and 
> changed the CMake file accordingly , but run into compile errors now. 
> The defines are taken from your responses, also your successfully 
> finished compile log file above.
> 
> But following your links there seems to be  no easy solution yet. 
> Fortunately it's a spare time project ...
> 
> Or, do I miss something?

I think you're using develop branch instead of get_rhs branch.
On develop, at:

 
https://github.com/cppljevans/spirit/blob/develop/include/boost/spirit/home/x3/nonterminal/rule.hpp#L241

the rat_v.post call is passed 3 args, but on get_rhs, at:

 
https://github.com/cppljevans/spirit/blob/get_rhs/include/boost/spirit/home/x3/nonterminal/rule.hpp#L235

the rat_v.post call is passed the correct 2 args.

So, checkout get_rhs and see if that doesn't solve the problem.


> 
> Thanks,
> Olaf

You're welcome, Olaf.  Good luck!

-regards,
Larry



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.