<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[boost - getting started]]></title><description><![CDATA[<p>Hallo, ich möchte gerne Boost ml ausprobieren,</p>
<p>also hab ich mir die Dateien mal gezogen, den Ordner habe ich in meinem home-verzeichnis entpackt,</p>
<p>nunja nun wollte ich einfach mal etwas ausprobieren:</p>
<pre><code>#include &quot;boost/filesystem/operations.hpp&quot;
#include &quot;boost/filesystem/fstream.hpp&quot;
#include &lt;iostream&gt;
using namespace std;

// Benutze fs für den Boost filesystem Namensraum
namespace fs = boost::filesystem;

int main()
{
    fs::remove_all(&quot;foobar&quot;);
    fs::create_directory(&quot;foobar&quot;);
    ofstream file(&quot;foobar/cheeze.txt&quot;);
    file &lt;&lt; &quot;tastes good!\n&quot;;
    file.close();
    if (!fs::exists(&quot;foobar/cheeze.txt&quot;))
        cout &lt;&lt; &quot;Something is rotten in foobar\n&quot;;

    return 0;
}
</code></pre>
<p>das funktioniert leider nicht ...</p>
<p>die compiler-einstellungen sind aber ok: -I /home/timo/boost</p>
<p>die includes sollte er also finden,</p>
<p>fehlermeldung:</p>
<pre><code>/home/timo/boost/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_system_category()'
...
und so weiter und so fort ...
</code></pre>
<p>das einzige beispiel das einfach so läuft ist:</p>
<pre><code>#include &lt;boost/config.hpp&gt;

#include &lt;string&gt;
#include &lt;iostream&gt;

#include &lt;boost/foreach.hpp&gt;

#include &lt;boost/bimap/bimap.hpp&gt;
#include &lt;boost/bimap/list_of.hpp&gt;
#include &lt;boost/bimap/support/lambda.hpp&gt;

using namespace boost::bimaps;

int main()
{
    //[ code_bimap_and_boost_foreach

    typedef bimap&lt; std::string, list_of&lt;int&gt; &gt; bm_type;

    bm_type bm;
    bm.insert( bm_type::value_type(&quot;1&quot;, 1) );
    bm.insert( bm_type::value_type(&quot;2&quot;, 2) );
    bm.insert( bm_type::value_type(&quot;3&quot;, 4) );
    bm.insert( bm_type::value_type(&quot;4&quot;, 2) );

    BOOST_FOREACH( bm_type::left_reference p, bm.left )
    {
        ++p.second; /*&lt; We can modify the right element because we have
                        use a mutable collection type in the right side. &gt;*/
    }

    BOOST_FOREACH( bm_type::right_const_reference p, bm.right )
    {
        std::cout &lt;&lt; p.first &lt;&lt; &quot;--&gt;&quot; &lt;&lt; p.second &lt;&lt; std::endl;
    }

    //]

    // More examples

    BOOST_FOREACH( bm_type::right_reference p, bm.right )
    {
        ++p.first;
    }

    BOOST_FOREACH( bm_type::left_const_reference p, bm.left )
    {
        std::cout &lt;&lt; p.first &lt;&lt; &quot;--&gt;&quot; &lt;&lt; p.second &lt;&lt; std::endl;
    }

    BOOST_FOREACH( bm_type::reference p, bm )
    {
        ++p.right;
    }

    const bm_type &amp; cbm = bm;
    BOOST_FOREACH( bm_type::const_reference p, cbm )
    {
        std::cout &lt;&lt; p.left &lt;&lt; &quot;--&gt;&quot; &lt;&lt; p.right &lt;&lt; std::endl;
    }

    BOOST_FOREACH( bm_type::const_reference p, bm )
    {
        std::cout &lt;&lt; p.left &lt;&lt; &quot;--&gt;&quot; &lt;&lt; p.right &lt;&lt; std::endl;
    }

    //[ code_bimap_and_boost_foreach_using_range

    BOOST_FOREACH( bm_type::left_reference p,
                 ( bm.left.range( std::string(&quot;1&quot;) &lt;= _key, _key &lt; std::string(&quot;3&quot;) ) ))
    {
        ++p.second;
    }

    BOOST_FOREACH( bm_type::left_const_reference p,
                 ( bm.left.range( std::string(&quot;1&quot;) &lt;= _key, _key &lt; std::string(&quot;3&quot;) ) ))
    {
        std::cout &lt;&lt; p.first &lt;&lt; &quot;--&gt;&quot; &lt;&lt; p.second &lt;&lt; std::endl;
    }
    //]

    return 0;
}
</code></pre>
<p>wieso ist das so?</p>
<p>muss ich boost eventuell doch &quot;installieren&quot; und libs erzeugen?<br />
(boost-jam macht mir irgendwie angst ...)</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/253359/boost-getting-started</link><generator>RSS for Node</generator><lastBuildDate>Sun, 13 Sep 2026 19:47:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/253359.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 01 Nov 2009 13:46:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 13:46:33 GMT]]></title><description><![CDATA[<p>Hallo, ich möchte gerne Boost ml ausprobieren,</p>
<p>also hab ich mir die Dateien mal gezogen, den Ordner habe ich in meinem home-verzeichnis entpackt,</p>
<p>nunja nun wollte ich einfach mal etwas ausprobieren:</p>
<pre><code>#include &quot;boost/filesystem/operations.hpp&quot;
#include &quot;boost/filesystem/fstream.hpp&quot;
#include &lt;iostream&gt;
using namespace std;

// Benutze fs für den Boost filesystem Namensraum
namespace fs = boost::filesystem;

int main()
{
    fs::remove_all(&quot;foobar&quot;);
    fs::create_directory(&quot;foobar&quot;);
    ofstream file(&quot;foobar/cheeze.txt&quot;);
    file &lt;&lt; &quot;tastes good!\n&quot;;
    file.close();
    if (!fs::exists(&quot;foobar/cheeze.txt&quot;))
        cout &lt;&lt; &quot;Something is rotten in foobar\n&quot;;

    return 0;
}
</code></pre>
<p>das funktioniert leider nicht ...</p>
<p>die compiler-einstellungen sind aber ok: -I /home/timo/boost</p>
<p>die includes sollte er also finden,</p>
<p>fehlermeldung:</p>
<pre><code>/home/timo/boost/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_system_category()'
...
und so weiter und so fort ...
</code></pre>
<p>das einzige beispiel das einfach so läuft ist:</p>
<pre><code>#include &lt;boost/config.hpp&gt;

#include &lt;string&gt;
#include &lt;iostream&gt;

#include &lt;boost/foreach.hpp&gt;

#include &lt;boost/bimap/bimap.hpp&gt;
#include &lt;boost/bimap/list_of.hpp&gt;
#include &lt;boost/bimap/support/lambda.hpp&gt;

using namespace boost::bimaps;

int main()
{
    //[ code_bimap_and_boost_foreach

    typedef bimap&lt; std::string, list_of&lt;int&gt; &gt; bm_type;

    bm_type bm;
    bm.insert( bm_type::value_type(&quot;1&quot;, 1) );
    bm.insert( bm_type::value_type(&quot;2&quot;, 2) );
    bm.insert( bm_type::value_type(&quot;3&quot;, 4) );
    bm.insert( bm_type::value_type(&quot;4&quot;, 2) );

    BOOST_FOREACH( bm_type::left_reference p, bm.left )
    {
        ++p.second; /*&lt; We can modify the right element because we have
                        use a mutable collection type in the right side. &gt;*/
    }

    BOOST_FOREACH( bm_type::right_const_reference p, bm.right )
    {
        std::cout &lt;&lt; p.first &lt;&lt; &quot;--&gt;&quot; &lt;&lt; p.second &lt;&lt; std::endl;
    }

    //]

    // More examples

    BOOST_FOREACH( bm_type::right_reference p, bm.right )
    {
        ++p.first;
    }

    BOOST_FOREACH( bm_type::left_const_reference p, bm.left )
    {
        std::cout &lt;&lt; p.first &lt;&lt; &quot;--&gt;&quot; &lt;&lt; p.second &lt;&lt; std::endl;
    }

    BOOST_FOREACH( bm_type::reference p, bm )
    {
        ++p.right;
    }

    const bm_type &amp; cbm = bm;
    BOOST_FOREACH( bm_type::const_reference p, cbm )
    {
        std::cout &lt;&lt; p.left &lt;&lt; &quot;--&gt;&quot; &lt;&lt; p.right &lt;&lt; std::endl;
    }

    BOOST_FOREACH( bm_type::const_reference p, bm )
    {
        std::cout &lt;&lt; p.left &lt;&lt; &quot;--&gt;&quot; &lt;&lt; p.right &lt;&lt; std::endl;
    }

    //[ code_bimap_and_boost_foreach_using_range

    BOOST_FOREACH( bm_type::left_reference p,
                 ( bm.left.range( std::string(&quot;1&quot;) &lt;= _key, _key &lt; std::string(&quot;3&quot;) ) ))
    {
        ++p.second;
    }

    BOOST_FOREACH( bm_type::left_const_reference p,
                 ( bm.left.range( std::string(&quot;1&quot;) &lt;= _key, _key &lt; std::string(&quot;3&quot;) ) ))
    {
        std::cout &lt;&lt; p.first &lt;&lt; &quot;--&gt;&quot; &lt;&lt; p.second &lt;&lt; std::endl;
    }
    //]

    return 0;
}
</code></pre>
<p>wieso ist das so?</p>
<p>muss ich boost eventuell doch &quot;installieren&quot; und libs erzeugen?<br />
(boost-jam macht mir irgendwie angst ...)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801637</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801637</guid><dc:creator><![CDATA[blooster]]></dc:creator><pubDate>Sun, 01 Nov 2009 13:46:33 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 13:49:53 GMT]]></title><description><![CDATA[<p>blooster schrieb:</p>
<blockquote>
<p>muss ich boost eventuell doch &quot;installieren&quot; und libs erzeugen?<br />
(boost-jam macht mir irgendwie angst ...)</p>
</blockquote>
<p>Das steht im &quot;getting started&quot; von boost alles drin. Die Mehrheit der Bibliotheken sind &quot;header only&quot;, die funktionieren sofort. Einige müssen aber erst gebaut werden. Für Windows gibts auch schon vorgebaute.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801639</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801639</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Sun, 01 Nov 2009 13:49:53 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 13:50:19 GMT]]></title><description><![CDATA[<p>du musst nicht nur die includes setzen, sondern auch gegen die boost::filesystem Bibliothek linken.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801640</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801640</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Sun, 01 Nov 2009 13:50:19 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 14:16:40 GMT]]></title><description><![CDATA[<p>Warum haben die nicht eigentlich alle Libraries Header-only gemacht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801650</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801650</guid><dc:creator><![CDATA[gutefrage]]></dc:creator><pubDate>Sun, 01 Nov 2009 14:16:40 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 14:50:24 GMT]]></title><description><![CDATA[<p>so, nun habe ich boost &quot;installiert&quot;</p>
<p>es existiert nun ein Verzeichnis</p>
<p>LIBS, in dem ich die Ordner include und lib habe.</p>
<p>folgendes Programm:</p>
<pre><code>// Boost Dateien includieren
#include &quot;boost/filesystem/operations.hpp&quot; 
#include &quot;boost/filesystem/fstream.hpp&quot; 
#include &lt;iostream&gt;                        
using namespace std;

// Benutze fs für den Boost filesystem Namensraum
namespace fs = boost::filesystem; 

int main()
{
    fs::remove_all(&quot;foobar&quot;);
    fs::create_directory(&quot;foobar&quot;);
    ofstream file(&quot;foobar/cheeze.txt&quot;);
    file &lt;&lt; &quot;tastes good!\n&quot;;
    file.close();
    if (!fs::exists(&quot;foobar/cheeze.txt&quot;))
        cout &lt;&lt; &quot;Something is rotten in foobar\n&quot;;

    return 0;
}
[code]

liefert folgende Fehler:

[code]
/home/timo/boost/LIBS/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_system_category()'
... usw ...
</code></pre>
<p>Compiler einstellung:<br />
/home/timo/boost/LIBS/include<br />
Linker:<br />
/home/timo/boost/LIBS/lib/libboost_filesystem.so</p>
<p>wieso funktioniert das jetzt wiederum nicht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801665</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801665</guid><dc:creator><![CDATA[blooster]]></dc:creator><pubDate>Sun, 01 Nov 2009 14:50:24 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 15:01:38 GMT]]></title><description><![CDATA[<p>Also ich habe da einfach einen Ordner angegeben, wo die .dll's sind und ich gebe nicht jede dll einzeln an. boost holt sich da eigentlich das raus, was es braucht. Und darum sieht es bei dir so aus, als ob noch was fehlt..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801669</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801669</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Sun, 01 Nov 2009 15:01:38 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 15:21:53 GMT]]></title><description><![CDATA[<p>gutefrage schrieb:</p>
<blockquote>
<p>Warum haben die nicht eigentlich alle Libraries Header-only gemacht?</p>
</blockquote>
<p>Weil die Kompilierzeit eben auch eine Rolle spielt. Viele Dinge in Boost sind als Templates realisiert, um Generizität zu ermöglichen. Wo das nicht nötig ist, ist eine Bibliothek angebrachter. Gewisse Dinge können zudem gar nicht im Header definiert werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801684</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801684</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Sun, 01 Nov 2009 15:21:53 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 15:23:45 GMT]]></title><description><![CDATA[<p>es wird mir immer vernebelter ums geistige auge:</p>
<p>also nochmal:</p>
<p>compiler:<br />
/home/timo/boost/LIBS/include</p>
<p>Linker:<br />
/home/timo/boost/LIBS/lib/libboost_filesystem.so.1.40.0<br />
/home/timo/boost/LIBS/lib/libboost_system.so</p>
<p>Error:<br />
/home/timo/boost/boost: error while loading shared libraries: libboost_filesystem.so.1.40.0: cannot open shared object file: No such file or directory</p>
<p>Die libboost_filesystem.so.1.40.0 befindet sich aber in<br />
/home/timo/boost/LIBS/lib/</p>
<p>Was will er von mir?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801687</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801687</guid><dc:creator><![CDATA[blooster]]></dc:creator><pubDate>Sun, 01 Nov 2009 15:23:45 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 16:28:06 GMT]]></title><description><![CDATA[<p>mal ganz ausführlich:</p>
<p>Eine Datei main.cpp</p>
<pre><code>// Boost Dateien includieren
#include &quot;boost/filesystem/operations.hpp&quot;
#include &quot;boost/filesystem/fstream.hpp&quot;
#include &lt;iostream&gt;
using namespace std;

// Benutze fs für den Boost filesystem Namensraum
namespace fs = boost::filesystem;

int main()
{
    fs::remove_all(&quot;foobar&quot;);
    fs::create_directory(&quot;foobar&quot;);
    ofstream file(&quot;foobar/cheeze.txt&quot;);
    file &lt;&lt; &quot;tastes good!\n&quot;;
    file.close();
    if (!fs::exists(&quot;foobar/cheeze.txt&quot;))
        cout &lt;&lt; &quot;Something is rotten in foobar\n&quot;;

    return 0;
}
</code></pre>
<p>aufruf in konsole:</p>
<pre><code>g++ -o test -I /home/timo/boost/  -L /home/timo/boost/LIBS/lib/ main.cpp
</code></pre>
<p>fehlermeldungen:</p>
<pre><code>ic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;(boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; const&amp;)]+0x46): undefined reference to `boost::filesystem::detail::status_api(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, boost::system::error_code&amp;)'
/tmp/ccr2qP2q.o: In function `boost::enable_if&lt;boost::filesystem::is_basic_path&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;, bool&gt;::type boost::filesystem::create_directory&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;(boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; const&amp;)':
main.cpp:(.text._ZN5boost10filesystem16create_directoryINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if&lt;boost::filesystem::is_basic_path&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;, bool&gt;::type boost::filesystem::create_directory&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;(boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; const&amp;)]+0x3a): undefined reference to `boost::filesystem::detail::create_directory_api(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
/tmp/ccr2qP2q.o: In function `bool boost::filesystem::detail::remove_aux&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;(boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; const&amp;, boost::filesystem::file_status)':
main.cpp:(.text._ZN5boost10filesystem6detail10remove_auxINS0_10basic_pathISsNS0_11path_traitsEEEEEbRKT_NS0_11file_statusE[bool boost::filesystem::detail::remove_aux&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;(boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; const&amp;, boost::filesystem::file_status)]+0x4e): undefined reference to `boost::filesystem::detail::remove_api(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
/tmp/ccr2qP2q.o: In function `boost::filesystem::basic_directory_iterator&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;::m_init(boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; const&amp;)':
main.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;::m_init(boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; const&amp;)]+0x3f): undefined reference to `boost::filesystem::detail::not_found_error()'
main.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;::m_init(boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; const&amp;)]+0x103): undefined reference to `boost::filesystem::detail::dir_itr_first(void*&amp;, void*&amp;, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, boost::filesystem::file_status&amp;, boost::filesystem::file_status&amp;)'
/tmp/ccr2qP2q.o: In function `boost::filesystem::basic_directory_iterator&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;::increment()':
main.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE9incrementEv[boost::filesystem::basic_directory_iterator&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;::increment()]+0xf4): undefined reference to `boost::filesystem::detail::dir_itr_increment(void*&amp;, void*&amp;, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, boost::filesystem::file_status&amp;, boost::filesystem::file_status&amp;)'
/tmp/ccr2qP2q.o: In function `boost::filesystem::detail::dir_itr_imp&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;::~dir_itr_imp()':
main.cpp:(.text._ZN5boost10filesystem6detail11dir_itr_impINS0_10basic_pathISsNS0_11path_traitsEEEED1Ev[boost::filesystem::detail::dir_itr_imp&lt;boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; &gt;::~dir_itr_imp()]+0x26): undefined reference to `boost::filesystem::detail::dir_itr_close(void*&amp;, void*&amp;)'
collect2: ld returned 1 exit status
</code></pre>
<p>was habe ich falsch gemacht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801720</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801720</guid><dc:creator><![CDATA[blooster]]></dc:creator><pubDate>Sun, 01 Nov 2009 16:28:06 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 16:52:36 GMT]]></title><description><![CDATA[<p>So automatisch geht das natürlich nicht... Du musst dem G++ schon die libs mitgeben, gegen die gelinkt werden sollen, z.B.:</p>
<pre><code>g++ -o test -I /home/timo/boost/  -L /home/timo/boost/LIBS/lib/ -lboost_filesystem main.cpp
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1801742</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801742</guid><dc:creator><![CDATA[automat]]></dc:creator><pubDate>Sun, 01 Nov 2009 16:52:36 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 18:24:09 GMT]]></title><description><![CDATA[<p>ich kapier dieses linkerzeugs einfach nicht:</p>
<p>wieso funktioniert</p>
<p>-lboost_filesystem (in verbindung mit lboost_system)</p>
<p>aber mit /lib/libboost_filesystem.so lieferts jede menge fehler?</p>
<p>naja mit obigem klappt das kompilieren, aber das ausführen liefert:</p>
<p>./test: error while loading shared libraries: libboost_filesystem.so.1.40.0: cannot open shared object file: No such file or directory</p>
<p>selbst wenn die .so im selben verzeichnis liegt wie test</p>
<p>kann mir das bitte jemand so erklären dass ich mir das auch für andere fälle merken kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801795</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801795</guid><dc:creator><![CDATA[blooster]]></dc:creator><pubDate>Sun, 01 Nov 2009 18:24:09 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 18:39:33 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /> Weil deine Umgebung einfach keinen Schimmer hat, wo die libs liegen.</p>
<p>Entweder</p>
<ol>
<li>du schreibst dir ein startup-Script, welches di Umgebungsvariable LDPATH um das DIR erweitert, wo deine boost-libs drin liegen</li>
<li>in deiner .bashrc diese Erweiterung von LDPATH durchführst, dann kannst du dir das startup_script sparen.</li>
<li>boost in deinem System global installierst, dass die libs + header in standrad-dirs (also /usr/Lib und /usr/include) liegen - am besten vertraust du deiner Distribution und installierst einfach die nötigen RPMs/DEBs/...</li>
</ol>
<p>Ich empfehle 3.</p>
<p>Am besten mit nem ordentlichen Makefile-Generator wie cmake. Das ist dann am unproblematischsten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801803</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801803</guid><dc:creator><![CDATA[automat]]></dc:creator><pubDate>Sun, 01 Nov 2009 18:39:33 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Sun, 01 Nov 2009 19:18:17 GMT]]></title><description><![CDATA[<p>und wieso klappt das linken mit dem exakten namen nicht?</p>
<p>/libboost_system.so</p>
<p>sollte doch eigentlich exakter wirken als -lboost_system?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801823</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801823</guid><dc:creator><![CDATA[blooster]]></dc:creator><pubDate>Sun, 01 Nov 2009 19:18:17 GMT</pubDate></item><item><title><![CDATA[Reply to boost - getting started on Mon, 02 Nov 2009 08:30:26 GMT]]></title><description><![CDATA[<p>blooster schrieb:</p>
<blockquote>
<p>und wieso klappt das linken mit dem exakten namen nicht?</p>
<p>/libboost_system.so</p>
<p>sollte doch eigentlich exakter wirken als -lboost_system?</p>
</blockquote>
<p>-&gt; man gcc<br />
-l will den Namen der Bibliothek, nicht den Dateinamen!<br />
Wenn du das -l weglässt kannst du auch direkt einen Dateinamen angeben. Muss aber dann mit Pfadangabe passen, wird halt nicht (praktischerweise) in den link-directories nach der lib gesucht (was mit -l der Fall gewesen wäre).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1801998</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1801998</guid><dc:creator><![CDATA[automat]]></dc:creator><pubDate>Mon, 02 Nov 2009 08:30:26 GMT</pubDate></item></channel></rss>