Menu

Trouble with modifying BOOST_PP_LIMIT_MAG

Help
Peng
2013-02-25
2013-02-28
  • Peng

    Peng - 2013-02-25

    My boost version is 1.53.0. I want to set BOOST_PP_LIMIT_MAG to 512 instead of 256, and change it in file boost/preprocessor/config/limits.hpp. Now I have trouble in making it work.

    I recompile boost with the commands:
    [root@localhost pwang]# cd boost_1_53_0/tools/build/v2/

    [root@localhost v2]# ./bootstrap.sh
    Bootstrapping the build engine with toolset gcc... engine/bin.linuxx86_64/bjam
    Bootstrapping is done. To build and install, run:
    ./b2 install --prefix=DIR

    [root@localhost v2]# ./b2 install

    Then, I compile owlcpp with the command
    [root@localhost owlcpp]# b2 release

    But, nothing changes, and BOOST_PP_LIMIT_MAG is still 256. How can I change Macro BOOST_PP_LIMIT_MAG? Thanks

    Peng

     
  • M Levin

    M Levin - 2013-02-25

    Hello Peng,

    Changing BOOST_PP_LIMIT_MAG in boost/preprocessor/config/limits.hpp, as you did, should work. This macro is not re-defined (or even mentioned) anywhere else in the Boost headers. It is not mentioned in owlcpp either.

    You could try defining it in the build command:
    b2 release define="BOOST_PP_LIMIT_MAG=512"
    This will probably produce a warning.

    Why do you want to change it? Are you experiencing compilation problems?

    Regards

    Mikhail

     
  • Peng

    Peng - 2013-02-26

    Hello Mikhail,

    Thank you for replying. But it does not fix the problem. The reason to modify BOOST_PP_LIMIT_MAG is that the maximum number of nodes is limited to 256 which is defined in file node_tags_owl.hpp, and we want to implement nodes for other namespaces such as swrl and swrlb. Then, the number of nodes will be more than 256.

    Also, since I am new to owlcpp, do you have any idea about how to implement the nodes for a new namespace? Which files have to be modified? Thanks.

    Peng

     
  • M Levin

    M Levin - 2013-02-28

    256 is the largest integer for which the arithmetics is supported by Boost.preprocessor library. Increasing that limit would take more than just redefining BOOST_PP_LIMIT_MAG.

    You can still define over 256 custom nodes. One approach is to leave the arithmetics to the compiler. In the latest commit there is a unit test for that (owlcpp/lib/rdf/test/std_nodes_custom_run.cpp). I have also re-factored the tag creation for convenience.

    Mikhail

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.