{"id":369,"date":"2009-11-14T20:10:09","date_gmt":"2009-11-15T04:10:09","guid":{"rendered":"http:\/\/boost-spirit.com\/home\/?page_id=369"},"modified":"2009-11-18T20:59:28","modified_gmt":"2009-11-19T04:59:28","slug":"using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41","status":"publish","type":"page","link":"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/","title":{"rendered":"Using Spirit V2.1 With Older Versions of Boost (pre V1.41)"},"content":{"rendered":"<p>Would you like to try the new version of <em>Spirit<\/em> but you are stuck with an older version of <a title=\"Boost\" href=\"http:\/\/www.boost.org\">Boost<\/a>? If yes, don\u2019t despair, there might be help!<\/p>\n<p>The new version of <em>Spirit<\/em> has been written to be compatible with all versions of Boost starting with V1.37 (which has been released roughly a year ago). So, if the <a title=\"Boost\" href=\"http:\/\/www.boost.org\">Boost<\/a> version you have to work with is not older than that you might want to read on.<\/p>\n<p>As you might already know, <em>Spirit<\/em> is a header only library. No source files have to be (pre-)compiled in order to use it. This feature makes it very easy to integrate the library into any build system. Just add the directory where <em>Spirit\u2019s<\/em> headers are located to the list of directories your compiler uses to look for files to include (the compiler\u2019s include search path).<\/p>\n<p>For older versions of <a title=\"Boost\" href=\"http:\/\/www.boost.org\">Boost<\/a> this directory needs to be placed on the compiler search path in front of your Boost include directory so the compiler will find the newer <em>Spirit<\/em> header files instead of the ones included with Boost. Let\u2019s assume you unpacked <em>Spirit<\/em> in a directory of your choice <span style=\"font-family: courier new\">&lt;yourdir&gt;<\/span> (while preserving the directory structure underneath: <span style=\"font-family: courier new\">&lt;yourdir&gt;\/boost\/spirit\/\u2026<\/span>) then for most compilers this amounts to adding a command line option: <span style=\"font-family: courier new\">-I&lt;yourdir&gt;<\/span>.<\/p>\n<p>The last question to answer is where to get Spirit V2.1. Well, either download <a href=\"http:\/\/sourceforge.net\/projects\/boost\/files\/\">Boost V1.41<\/a> and extract the <em>Spirit<\/em> directories (there are two subdirectories you might be interested in: <span style=\"font-family: courier new\">\u2026\/boost\/spirit\/\u2026<\/span> and <span style=\"font-family: courier new\">\u2026\/libs\/spirit\/<span style=\"font-family: courier new\">\u2026<\/span><\/span>) from the archive. The other option is to simply download from here:<\/p>\n<ul>\n<li><a href=\"http:\/\/boost-spirit.com\/dl_more\/spirit-2.1.zip\">Spirit 2.1 files for Windows<\/a> (CR\/LF line endings) or<\/li>\n<li><a href=\"http:\/\/boost-spirit.com\/dl_more\/spirit-2.1.tar.gz\">Spirit 2.1 files for *nix<\/a> (LF line endings).<\/li>\n<\/ul>\n<p>Both files contain a snapshot of the files related to <em>Spirit<\/em> taken from the <a href=\"http:\/\/sourceforge.net\/projects\/boost\/files\/\">Boost V1.41<\/a> release archives). The only thing to watch out is that these files will not be usable without any existing Boost installation.<\/p>\n<p>Happy hacking!<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li><a href=\"#\" class=\"sharing-anchor sd-button share-more\"><span>Share<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><div class=\"sharing-hidden\"><div class=\"inner\" style=\"display: none;\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-369\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-369\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-pinterest\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-pinterest-369\" class=\"share-pinterest sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/?share=pinterest\" target=\"_blank\" title=\"Click to share on Pinterest\" ><span>Pinterest<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-369\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\" ><span>LinkedIn<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-reddit\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-reddit sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/?share=reddit\" target=\"_blank\" title=\"Click to share on Reddit\" ><span>Reddit<\/span><\/a><\/li><li class=\"share-tumblr\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-tumblr sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/?share=tumblr\" target=\"_blank\" title=\"Click to share on Tumblr\" ><span>Tumblr<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Would you like to try the new version of Spirit but you are stuck with an older version of Boost? If yes, don\u2019t despair, there might be help! The new version of Spirit has been written to be compatible with all versions of Boost starting with V1.37 (which has been released roughly a year ago). [&hellip;]<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li><a href=\"#\" class=\"sharing-anchor sd-button share-more\"><span>Share<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><div class=\"sharing-hidden\"><div class=\"inner\" style=\"display: none;\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-369\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-369\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-pinterest\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-pinterest-369\" class=\"share-pinterest sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/?share=pinterest\" target=\"_blank\" title=\"Click to share on Pinterest\" ><span>Pinterest<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-369\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\" ><span>LinkedIn<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-reddit\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-reddit sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/?share=reddit\" target=\"_blank\" title=\"Click to share on Reddit\" ><span>Reddit<\/span><\/a><\/li><li class=\"share-tumblr\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-tumblr sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/articles\/spirit2-1-release\/using-spirit-v2-1-with-older-versions-of-boost-pre-v1-41\/?share=tumblr\" target=\"_blank\" title=\"Click to share on Tumblr\" ><span>Tumblr<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div><\/div><\/div>","protected":false},"author":3,"featured_media":0,"parent":377,"menu_order":2,"comment_status":"open","ping_status":"open","template":"article-page.php","meta":{"_s2mail":"","spay_email":""},"jetpack_shortlink":"https:\/\/wp.me\/PIHdZ-5X","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/pages\/369"}],"collection":[{"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/comments?post=369"}],"version-history":[{"count":6,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/pages\/369\/revisions"}],"predecessor-version":[{"id":418,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/pages\/369\/revisions\/418"}],"up":[{"embeddable":true,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/pages\/377"}],"wp:attachment":[{"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/media?parent=369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}