<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Raymond P. Burkholder - Things I Do - Boost</title>
    <link>http://blog.raymond.burkholder.net/</link>
    <description>In And Around Technology and The Arts</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.7.2 - http://www.s9y.org/</generator>
    <pubDate>Sun, 24 Sep 2023 00:26:51 GMT</pubDate>

    <image>
        <url>http://blog.raymond.burkholder.net/templates/bulletproof/img/s9y_banner_small.png</url>
        <title>RSS: Raymond P. Burkholder - Things I Do - Boost - In And Around Technology and The Arts</title>
        <link>http://blog.raymond.burkholder.net/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>How to do a dynamic parser in X3?</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/1246-How-to-do-a-dynamic-parser-in-X3.html</link>
            <category>Boost</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/1246-How-to-do-a-dynamic-parser-in-X3.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=1246</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1246</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=9QlPOYX8mgw&quot; target=_blank&gt;how to do a dynamic parser in X3?&lt;/a&gt;

&lt;blockquote&gt;
&lt;p&gt;The presentation went well, but as always with a large surface area
library like Spirit it went on for too long IMO (2 hrs).  This was
similar to what happened when I presented Spirit 2.x almost 10 yrs
ago.  If I were to present on this again, I would split the topic into
two talks:
&lt;ul&gt;
  &lt;li&gt;A background on recursive variant datatypes and visitor pattern and
dipping into the Fusion library for adapting arbitrary application
structures to Fusion tuples.
  &lt;li&gt;Spirit X3 parsing w/annotations and error handling.
  &lt;/ul&gt;
&lt;p&gt;I try to present from real code in the IDE as much as
possible so that we&#039;re looking at real code.  I almost always write
my own examples with the library I&#039;m presenting and put them on
github.  The exception is when the library comes with an example that
is everything I want to talk about &lt;img src=&quot;http://blog.raymond.burkholder.net/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;.

&lt;p&gt;I cribbed quite a bit from the spirit x3 fun example presented by
Michael Caisse a few years back, but I did extend the AST to handle
imaginary numbers.
&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Sun, 24 Sep 2023 00:26:51 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/1246-guid.html</guid>
    
</item>
<item>
    <title>When Only the Impossible Remaining Reason is the Plausible Reason</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/995-When-Only-the-Impossible-Remaining-Reason-is-the-Plausible-Reason.html</link>
            <category>Boost</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/995-When-Only-the-Impossible-Remaining-Reason-is-the-Plausible-Reason.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=995</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=995</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;I&#039;ve been using &lt;a href=&quot;https://netbeans.org/&quot; target=_blank&gt;NetBeans&lt;/a&gt; for quite some time as a GUI based IDE for building C++ projects.  Recently, 
the project has been migrated over to Apache for management.  In the transition time frame, 
NetBeans has progressed from 8.2 to 9.0 to the current 10.0 incarnation.  The 8.2 version was the last 
which had an integral C++ development environment.

&lt;p&gt;Via jumping through a few hoops, it is possible to run the c++ development environment in v10.0.  The draw back is that 
what ever was available in 8.2 remains as &#039;current&#039;.  Which means the build environment is 
stuck at C++13.

&lt;p&gt;By finding a development/beta version of 8.2 , I was able to obtain C++17 capability, but at a cost 
of stability of the IDE.  Development of this branch has been discontinued since, I think, early 2018.  I do not
 know if any behind-the-scenes work is happening somewhere.

&lt;p&gt;So... it is time to try something else.  Prior to NetBeans, I had been using &lt;a href=&quot;https://www.eclipse.org/&quot; target=_blank&gt;Eclipse&lt;/a&gt; as an IDE.  But, way back then,  I had switched to 
NetBeans as Eclipse appeared to be lagging and unstable.  The tables have turned.  Eclipse appears to be 
progressing well now as a C++ IDE, far surpassing NetBean&#039;s capability.

&lt;p&gt;For building, NetBeans generated makefiles directly.  Eclipse can do the same.  But Eclipse is also 
able to work with CMakeLists.txt files.  Probably a boon as well as a bane, but as other projects are CMake based, 
I felt it might be worth a try to try.

&lt;p&gt;So I dived in.  I fought for a while to convert my make environment over to CMake.  Boost libraries, with v1.69.0
can cause some troubles with CMake find_package abilities.  The basic trick is to add the following for builds for v1.69 and possibly for v1.68:

&lt;blockquote&gt;&lt;pre&gt;
set(CMAKE_CXX_COMPILER_ARCHITECTURE_ID, &quot;x64&quot;)
set(Boost_ARCHITECTURE &quot;-x64&quot;)
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;A primary issue undermining my successful transition was that I was using boost::log::trivial.  No matter what 
I tried, it seems as though a CMake initiated make just wouldn&#039;t find the symbols.  A message of the kind:

&lt;blockquote&gt;&lt;pre&gt;
undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()&#039;
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;The solution was simple.  I had already performed the needed resolution in the old IDE.  But forgot to migrate it to the new CMake file.

&lt;p&gt;But as a note for posterity, adding the following to a c++ build line (which also incorporates the link step), will forward options to &#039;ld&#039;, the linker.

&lt;blockquote&gt;&lt;pre&gt;
-Wl,--trace -Wl,--verbose
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;These options tell ld to emit additional troubleshooting information.  But where to put these flags?  I used the following to show the command expansions, which I could then copy and paste and change for 
testing (I found the flag in CMakeCache.txt):

&lt;blockquote&gt;&lt;pre&gt;
build_dir$ cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE ..
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;The result was that I was indeed successfully resolving the boost_log library inclusion.  But why wasn&#039;t it accessing the symbols?

&lt;p&gt;The realization occurred after inspecting the library directly, and there is was, the symbol, in all its glory, different from the one for which the linker was originally searching 
(variations are discussed on &lt;a href=&quot;https://stackoverflow.com/questions/34732/how-do-i-list-the-symbols-in-a-so-file&quot; target=_blank&gt;StackOverFlow&lt;/a&gt;:

&lt;blockquote&gt;&lt;pre&gt;
# nm -gC libboost_log-gcc8-mt-x64-1_69.so.1.69.0|grep trivial
0000000000099a80 T boost::log::v2_mt_posix::trivial::logger::get()
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Well the solution is to place the following in to the CMakeLists.txt file:

&lt;blockquote&gt;&lt;pre&gt;
target_compile_definitions(${PROJECT_NAME} PUBLIC BOOST_LOG_DYN_LINK )
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;This forces the c++ build to use the dynamic boost::log library rather than the static file.  The symbol then changes to 

&lt;blockquote&gt;&lt;pre&gt;
`boost::log::v2_mt_posix::trivial::logger::get()&#039;
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt; which can fe found in the dynamic link file.  And all is well.

&lt;p&gt;As a side note, when using the CMAKE_VERBOSE_MAKEFILE expansion, with a few tweaks I was able to take a &#039;/usr/bin/c++&#039; invocation and run it instead as 
&#039;/usr/bin/ld&#039;.  But this doesn&#039;t work very well due to many missing libraries, which the linking form of &#039;/usr/bin/c++&#039; automatically provides.

&lt;p&gt;The link command is found in CMakeFiles/${program_name}.dir/link.txt along with other build products.
 
    </content:encoded>

    <pubDate>Thu, 04 Apr 2019 01:42:03 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/995-guid.html</guid>
    
</item>
<item>
    <title>Boost Bind/Lambda replaced by Boost Spirit/Phoenix</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/114-Boost-BindLambda-replaced-by-Boost-SpiritPhoenix.html</link>
            <category>Boost</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/114-Boost-BindLambda-replaced-by-Boost-SpiritPhoenix.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=114</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=114</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Regular users of the C++ library known as Boost will already know about  functors, lambda functions, and the like.  These abilities mostly originate in  the Boost.Bind and Boost.Lambda libraries. &lt;br /&gt;&lt;a href=&quot;http://blog.raymond.burkholder.net/index.php?/archives/114-Boost-BindLambda-replaced-by-Boost-SpiritPhoenix.html#extended&quot;&gt;Continue reading &quot;Boost Bind/Lambda replaced by Boost Spirit/Phoenix&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 19 Aug 2009 17:04:02 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/114-guid.html</guid>
    
</item>
<item>
    <title>Boost Preprocessor: Arrays</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/121-Boost-Preprocessor-Arrays.html</link>
            <category>Boost</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/121-Boost-Preprocessor-Arrays.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=121</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=121</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Typically, in some form of C++ best practice summaries, it is recommended to stay away  from using the C++ Macro Preprocessor.  For the most part, except when I needed to  Microsoft  MFC message maps, where use preprocessor macros, I have followed this maxim.  Until now. &lt;br /&gt;&lt;a href=&quot;http://blog.raymond.burkholder.net/index.php?/archives/121-Boost-Preprocessor-Arrays.html#extended&quot;&gt;Continue reading &quot;Boost Preprocessor: Arrays&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 26 Apr 2009 14:53:15 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/121-guid.html</guid>
    
</item>
<item>
    <title>Boost Build</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/378-Boost-Build.html</link>
            <category>Boost</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/378-Boost-Build.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=378</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=378</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;&lt;a href=&quot;http://www.boost.org&quot; target=_blank&gt;Boost C++ Library&lt;/a&gt; has a large number of  interesting modules.  Most of the modules are header only templates readily used on many  platforms and many recent version compilers.

&lt;p&gt;A few of the modules, such as Regex and DateTime, need to be compiled into static or 
dynamic link libraries.  To do so, requires the use of Boost&#039;s build tool:  bjam.  

&lt;p&gt;To build all variations of the libraries, single/multithreaded, debug/release, and 
static/dynamic, the command is simple (example for windows):

&lt;blockquote&gt;&lt;pre&gt;
bjam --toolset=msvc --build-type=complete stage
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Finding out how to build a subset of the libraries is a bit harder.  The options I use 
are:

&lt;blockquote&gt;&lt;pre&gt;
bjam --toolset=msvc variant=debug,release threading=multi link=static stage
&lt;/pre&gt;&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Fri, 10 Oct 2008 11:31:39 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/378-guid.html</guid>
    
</item>

</channel>
</rss>
