Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <434B9568.1000705@sh.cvut.cz> Date: Tue, 11 Oct 2005 12:35:20 +0200 From: =?UTF-8?B?VsOhY2xhdiBIYWlzbWFu?= User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: problem with boost 1.33 filesystem References: <434AD617 DOT 2090700 AT princeton DOT edu> In-Reply-To: <434AD617.2090700@princeton.edu> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD41770AE09E5F68877E849C0" X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com --------------enigD41770AE09E5F68877E849C0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit I'll look into it. wilx Lewis Hyatt wrote: > Hi All, > > I apologize if this has been brought up before, but I couldn't find any > mention of it. I think the filesystem component of boost v1.33 currently > available as part of the cygwin distribution has been compiled > incorrectly. As mentioned here: > http://boost.org/libs/filesystem/doc/index.htm#Cgywin (sic), it is > necessary to compile with -DBOOST_POSIX on cygwin for POSIX emulation to > work properly; otherwise it uses Windows file names only and does not > work as expected. Here is a simple demonstration: > > //////////////////////////// > #include > #include > #include > namespace bfs = boost::filesystem; > > int main(int argc, char **argv) { > //arg checking omitted > try { > bfs::directory_iterator di(argv[1]); > } > catch (bfs::filesystem_error &ex) { > std::cerr << ex.what() << '\n'; > } > } > //////////////////////////// > > If you pass something Windows can handle as the argument, such as ".", > then this program works as expected. If you pass a cygwin path, such > as "~" or "/cygdrive/c", it throws an exception: > > boost::filesystem::directory_iterator constructor: "\home\Lewis": The > system cannot find the path specified. > > or > > boost::filesystem::directory_iterator constructor: "\cygdrive\c": The > system cannot find the path specified. > > I believe this is precisely the consequence of omitting -DBOOST_POSIX > but cannot confirm with certainty. > > Thanks very much to whoever maintains this. > > -Lewis > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Problem reports: http://cygwin.com/problems.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ --------------enigD41770AE09E5F68877E849C0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iQEVAwUBQ0uVaG56zbtzMDG0AQIjTQf/SagG2z7LJlfeYC9lwzYc6XXKLMiMpRkl XGjwrD5bse3kHWKSkBGQRczORgO8hGNIUnhTyVPadVTwcXvE3NY4d1UUvvacnPq7 t7SmG0Eifdw/RDze8YjgpT0uXqVMWvYY9/lMDJMmSlQVuoxfdVrE+eC+T/Rah28f Z6MMEL8ljP8uwllzlZySN9KHFX5nLgiKbFw9KJObj0tJA4SDdTUH7BDO9LKF2Wjq hlayAw5L4s9ZPWis4vdpqSZXBmRV8qDLKE6inXzPHdbJbaLRELgxYA1J3EFV30lK q/Lwjr3FaLtFkV8JqN/99Zo7ASBvLjIbCBRFxK5LWpp/Ngw6sfq8iA== =1Yfk -----END PGP SIGNATURE----- --------------enigD41770AE09E5F68877E849C0--