<?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::Filesystem will nicht]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe mir eine Funktion gebastelt, die mir alle DLLs in einem angegebenen Verzeichnis auflisten soll. Um portabel zu bleiben, hab ich mich für Boost::Filesystem entschieden:</p>
<pre><code class="language-cpp">unsigned int otfw::DynLibLoader::EnumDynLibs(otfw::DynLibEnumeration &amp;target, const std::string format, const std::string &amp;pathname , bool scansubdirs)
{
	path libpath(pathname);
	unsigned int counter = 0;

	if(!exists(libpath))
		return 0;

	if(!is_directory(libpath))
		return 0;

	for(path::iterator current_file = libpath.begin(); current_file != libpath.end(); current_file++)
	{
		if(is_directory(*current_file))
		{
			//scan recursively in subdirectories
			if(scansubdirs)
				counter += EnumDynLibs(target, format, *current_file, true);
		}
		else
		{
			std::string file_ext = current_file-&gt;substr(current_file-&gt;length() - 4, current_file-&gt;length());	
			if(file_ext == &quot;.dll&quot;)
			{
				target.push_back(*current_file);
			}
		}

	}

	return counter;
}
</code></pre>
<p>Das Problem: Egal welches Verzeichnis ich übergebe, jedes mal gibt exists() bzw. is_directory() false zurück, egal was ich angebe (&quot;./&quot;,&quot;.&quot;,&quot;./foo&quot;, &quot;foo&quot;, &quot;c:/spiele/&quot;,...)<br />
Gibt es irgendwas, dass ich nicht beachtet habe?<br />
Ich benutze MS Visual-C++ Express auf WinXP Sp2 mit den Boost-Libraries von Boost-Consulting</p>
<p>Danke schonmal...</p>
<p>Martin</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/190721/boost-filesystem-will-nicht</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 17:43:03 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/190721.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 25 Aug 2007 22:38:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Boost::Filesystem will nicht on Sat, 25 Aug 2007 22:41:34 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe mir eine Funktion gebastelt, die mir alle DLLs in einem angegebenen Verzeichnis auflisten soll. Um portabel zu bleiben, hab ich mich für Boost::Filesystem entschieden:</p>
<pre><code class="language-cpp">unsigned int otfw::DynLibLoader::EnumDynLibs(otfw::DynLibEnumeration &amp;target, const std::string format, const std::string &amp;pathname , bool scansubdirs)
{
	path libpath(pathname);
	unsigned int counter = 0;

	if(!exists(libpath))
		return 0;

	if(!is_directory(libpath))
		return 0;

	for(path::iterator current_file = libpath.begin(); current_file != libpath.end(); current_file++)
	{
		if(is_directory(*current_file))
		{
			//scan recursively in subdirectories
			if(scansubdirs)
				counter += EnumDynLibs(target, format, *current_file, true);
		}
		else
		{
			std::string file_ext = current_file-&gt;substr(current_file-&gt;length() - 4, current_file-&gt;length());	
			if(file_ext == &quot;.dll&quot;)
			{
				target.push_back(*current_file);
			}
		}

	}

	return counter;
}
</code></pre>
<p>Das Problem: Egal welches Verzeichnis ich übergebe, jedes mal gibt exists() bzw. is_directory() false zurück, egal was ich angebe (&quot;./&quot;,&quot;.&quot;,&quot;./foo&quot;, &quot;foo&quot;, &quot;c:/spiele/&quot;,...)<br />
Gibt es irgendwas, dass ich nicht beachtet habe?<br />
Ich benutze MS Visual-C++ Express auf WinXP Sp2 mit den Boost-Libraries von Boost-Consulting</p>
<p>Danke schonmal...</p>
<p>Martin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1352098</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1352098</guid><dc:creator><![CDATA[JimmydaMage]]></dc:creator><pubDate>Sat, 25 Aug 2007 22:41:34 GMT</pubDate></item><item><title><![CDATA[Reply to Boost::Filesystem will nicht on Sun, 26 Aug 2007 07:18:36 GMT]]></title><description><![CDATA[<p>Welche Boost-Version benutzt du denn?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1352143</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1352143</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Sun, 26 Aug 2007 07:18:36 GMT</pubDate></item><item><title><![CDATA[Reply to Boost::Filesystem will nicht on Sun, 26 Aug 2007 07:35:56 GMT]]></title><description><![CDATA[<p>backslash escapen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1352148</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1352148</guid><dc:creator><![CDATA[heinz von tomate]]></dc:creator><pubDate>Sun, 26 Aug 2007 07:35:56 GMT</pubDate></item><item><title><![CDATA[Reply to Boost::Filesystem will nicht on Sun, 26 Aug 2007 09:21:49 GMT]]></title><description><![CDATA[<p>Ich benutze Boost 1.34<br />
Backslashes benutze ich garnicht, lt. Doku sollten auch Slashes funktionieren...<br />
Hab's auch mit Backslashes &quot;C:\\Spiele&quot; probiert, funktioniert aber auch nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>EDIT: Hab gerade gesehen, dass Backslashes im Konstruktor für path in Slashes umgewandelt werden...</p>
<p>EDIT2: Exception wird auch nicht geworfen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1352184</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1352184</guid><dc:creator><![CDATA[JimmydaMage]]></dc:creator><pubDate>Sun, 26 Aug 2007 09:21:49 GMT</pubDate></item><item><title><![CDATA[Reply to Boost::Filesystem will nicht on Sun, 26 Aug 2007 10:06:35 GMT]]></title><description><![CDATA[<p>OK, ich hab das Problem scheinbar gelöst, indem ich gegen eine DLL-Version von Boost::Filesystem gelinkt habe...<br />
Kann mir jemand erklären was die verschiedenen Bibliotheken im Boost Verzeichnis bedeuten?</p>
<p>- boost_filesystem-vc80-mt-1_34_1.lib (DLL?)<br />
- boost_filesystem-vc80-mt-gd-1_34_1.lib (DLL, Debug?)<br />
- libboost_filesystem-vc80-mt-1_34_1.lib (statisch?)<br />
- libboost_filesystem-vc80-mt-gd-1_34_1.lib (statisch, Debug?)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1352207</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1352207</guid><dc:creator><![CDATA[JimmydaMage]]></dc:creator><pubDate>Sun, 26 Aug 2007 10:06:35 GMT</pubDate></item><item><title><![CDATA[Reply to Boost::Filesystem will nicht on Sun, 26 Aug 2007 10:51:36 GMT]]></title><description><![CDATA[<p><a href="http://www.boost.org/more/getting_started/windows.html#library-naming" rel="nofollow">http://www.boost.org/more/getting_started/windows.html#library-naming</a></p>
<p>Die Doku is da eigentlich sehr brauchbar...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1352218</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1352218</guid><dc:creator><![CDATA[noNeed 4 aNick]]></dc:creator><pubDate>Sun, 26 Aug 2007 10:51:36 GMT</pubDate></item><item><title><![CDATA[Reply to Boost::Filesystem will nicht on Sun, 26 Aug 2007 11:05:45 GMT]]></title><description><![CDATA[<p>Danke, das hab ich nicht gefunden...<br />
Die Doku, naja, ist zwar sehr vollständig und umfangreich aber leider nicht besonders übersichtlich und manchmal ziemlich kryptisch...</p>
<p>GRüße,</p>
<p>Martin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1352225</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1352225</guid><dc:creator><![CDATA[JimmydaMage]]></dc:creator><pubDate>Sun, 26 Aug 2007 11:05:45 GMT</pubDate></item></channel></rss>