<?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 Library falsch eingebunden?]]></title><description><![CDATA[<p>Hallo</p>
<p>ich habe Boost in mein Netbeans IDE eingebunden und versuche folgenden Code zum laufen zu bekommen.</p>
<pre><code>#ifndef BOOST_SYSTEM_NO_DEPRECATED
#define BOOST_SYSTEM_NO_DEPRECATED
#include &lt;cstdlib&gt;
#include &lt;string&gt;
#include &lt;iostream&gt;
#include &quot;boost/filesystem.hpp&quot;

using namespace std;
using namespace boost::filesystem;

/*
 * 
 */
int main(int argc, char** argv) {

    path file(&quot;/home/benni/test.html&quot;);
    if(exists(file)) {
        cout &lt;&lt; file_size(file);
    }
    else {
        cout &lt;&lt; &quot;Nicht vorhanden&quot;;
    }
    return 0;
}

#endif
</code></pre>
<p>In der IDE habe ich folgendes gemacht</p>
<p>Unter C++ Compiler habe ich den obersten Boost Ordner als Lib angegeben.</p>
<p>Im Linker habe ich oben den Boost/lib Ordner als Lib angegeben und bei dem Linker unten unter Libraries habe ich nichts eingetragen. Da ich einfach die passenden Files nicht gefunden habe.</p>
<p>Jetzt bekomme ich, wenn ich das Projekt mit Build starte, folgende Fehlermeldung</p>
<pre><code>&quot;/usr/bin/make&quot; -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Verzeichnis »/home/benni/NetBeansProjects/Trash RM« wird betreten
&quot;/usr/bin/make&quot;  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/trash_rm
make[2]: Verzeichnis »/home/benni/NetBeansProjects/Trash RM« wird betreten
mkdir -p dist/Debug/GNU-Linux-x86
g++     -o dist/Debug/GNU-Linux-x86/trash_rm build/Debug/GNU-Linux-x86/main.o -Lboost_1_58_0/libs
build/Debug/GNU-Linux-x86/main.o: In Funktion `boost::filesystem::exists(boost::filesystem::path const&amp;)':
/home/benni/NetBeansProjects/Trash RM/boost_1_58_0/boost/filesystem/operations.hpp:404: Nicht definierter Verweis auf `boost::filesystem::detail::status(boost::filesystem::path const&amp;, boost::system::error_code*)'
build/Debug/GNU-Linux-x86/main.o: In Funktion `boost::filesystem::file_size(boost::filesystem::path const&amp;)':
/home/benni/NetBeansProjects/Trash RM/boost_1_58_0/boost/filesystem/operations.hpp:571: Nicht definierter Verweis auf `boost::filesystem::detail::file_size(boost::filesystem::path const&amp;, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/trash_rm] Fehler 1
make[2]: Verzeichnis »/home/benni/NetBeansProjects/Trash RM« wird verlassen
make[1]: *** [.build-conf] Fehler 2
make[1]: Verzeichnis »/home/benni/NetBeansProjects/Trash RM« wird verlassen
make: *** [.build-impl] Fehler 2

BUILD FAILED (exit value 2, total time: 849ms)
</code></pre>
<p>Liegt es jetzt daran das ich irgendwelche Libs nicht angegeben habe?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/333472/boost-library-falsch-eingebunden</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 23:53:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/333472.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 09 Jul 2015 20:17:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Boost Library falsch eingebunden? on Thu, 09 Jul 2015 20:17:31 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>ich habe Boost in mein Netbeans IDE eingebunden und versuche folgenden Code zum laufen zu bekommen.</p>
<pre><code>#ifndef BOOST_SYSTEM_NO_DEPRECATED
#define BOOST_SYSTEM_NO_DEPRECATED
#include &lt;cstdlib&gt;
#include &lt;string&gt;
#include &lt;iostream&gt;
#include &quot;boost/filesystem.hpp&quot;

using namespace std;
using namespace boost::filesystem;

/*
 * 
 */
int main(int argc, char** argv) {

    path file(&quot;/home/benni/test.html&quot;);
    if(exists(file)) {
        cout &lt;&lt; file_size(file);
    }
    else {
        cout &lt;&lt; &quot;Nicht vorhanden&quot;;
    }
    return 0;
}

#endif
</code></pre>
<p>In der IDE habe ich folgendes gemacht</p>
<p>Unter C++ Compiler habe ich den obersten Boost Ordner als Lib angegeben.</p>
<p>Im Linker habe ich oben den Boost/lib Ordner als Lib angegeben und bei dem Linker unten unter Libraries habe ich nichts eingetragen. Da ich einfach die passenden Files nicht gefunden habe.</p>
<p>Jetzt bekomme ich, wenn ich das Projekt mit Build starte, folgende Fehlermeldung</p>
<pre><code>&quot;/usr/bin/make&quot; -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Verzeichnis »/home/benni/NetBeansProjects/Trash RM« wird betreten
&quot;/usr/bin/make&quot;  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/trash_rm
make[2]: Verzeichnis »/home/benni/NetBeansProjects/Trash RM« wird betreten
mkdir -p dist/Debug/GNU-Linux-x86
g++     -o dist/Debug/GNU-Linux-x86/trash_rm build/Debug/GNU-Linux-x86/main.o -Lboost_1_58_0/libs
build/Debug/GNU-Linux-x86/main.o: In Funktion `boost::filesystem::exists(boost::filesystem::path const&amp;)':
/home/benni/NetBeansProjects/Trash RM/boost_1_58_0/boost/filesystem/operations.hpp:404: Nicht definierter Verweis auf `boost::filesystem::detail::status(boost::filesystem::path const&amp;, boost::system::error_code*)'
build/Debug/GNU-Linux-x86/main.o: In Funktion `boost::filesystem::file_size(boost::filesystem::path const&amp;)':
/home/benni/NetBeansProjects/Trash RM/boost_1_58_0/boost/filesystem/operations.hpp:571: Nicht definierter Verweis auf `boost::filesystem::detail::file_size(boost::filesystem::path const&amp;, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/trash_rm] Fehler 1
make[2]: Verzeichnis »/home/benni/NetBeansProjects/Trash RM« wird verlassen
make[1]: *** [.build-conf] Fehler 2
make[1]: Verzeichnis »/home/benni/NetBeansProjects/Trash RM« wird verlassen
make: *** [.build-impl] Fehler 2

BUILD FAILED (exit value 2, total time: 849ms)
</code></pre>
<p>Liegt es jetzt daran das ich irgendwelche Libs nicht angegeben habe?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2459206</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2459206</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 09 Jul 2015 20:17:31 GMT</pubDate></item><item><title><![CDATA[Reply to Boost Library falsch eingebunden? on Thu, 09 Jul 2015 21:24:06 GMT]]></title><description><![CDATA[<p>Die Bibliothek sollte einfach libboost_filesystem oder so ähnlich heißen. Und ja, sie ist nötig.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2459213</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2459213</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Thu, 09 Jul 2015 21:24:06 GMT</pubDate></item><item><title><![CDATA[Reply to Boost Library falsch eingebunden? on Fri, 10 Jul 2015 06:41:16 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>Die Bibliothek sollte einfach libboost_filesystem oder so ähnlich heißen. Und ja, sie ist nötig.</p>
</blockquote>
<p>Schon der COMPILER meldet einen Fehler. &quot;boost/filesystem.hpp&quot; gibt es nicht. Vorschlag:</p>
<pre><code>#include &lt;boost/filesystem/operations.hpp&gt;
</code></pre>
<p>Übersetzen mit -I/usr/local (wenn Boost dort installiert wurde)</p>
<p>und Linken mit</p>
<p>-L/usr/local/lib -lboost_filesystem</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2459251</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2459251</guid><dc:creator><![CDATA[oh_boost!]]></dc:creator><pubDate>Fri, 10 Jul 2015 06:41:16 GMT</pubDate></item><item><title><![CDATA[Reply to Boost Library falsch eingebunden? on Fri, 10 Jul 2015 06:47:40 GMT]]></title><description><![CDATA[<p>Sorry, Linker Fehler: Hatte meine Brille verlegt....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2459252</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2459252</guid><dc:creator><![CDATA[oh_boost!]]></dc:creator><pubDate>Fri, 10 Jul 2015 06:47:40 GMT</pubDate></item><item><title><![CDATA[Reply to Boost Library falsch eingebunden? on Fri, 10 Jul 2015 10:30:45 GMT]]></title><description><![CDATA[<p>Ja hab jetzt gesehen das man die Libs erst bauen muss.</p>
<p>Hab sie jetzt im Boost Verzeichnis mit ./bootstrap.sh und danach ./b2 gebaut und dann in der IDE als Libs hinzugefügt.<br />
Funktioniert nun alles soweit vielen dank</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2459272</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2459272</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 10 Jul 2015 10:30:45 GMT</pubDate></item></channel></rss>