Boost logo

Boost Users :

Subject: [Boost-users] Updating filesystem to V3 (boost 1.49)
From: Shai Shasag (shai_at_[hidden])
Date: 2012-05-06 12:46:45


I'm in the process of updating my code to use filesystem V3. I replaced all the V2 deprecated functions with V3 calls. I defined the macros:
BOOST_FILESYSTEM_VERSION=3
BOOST_FILESYSTEM_NO_DEPRECATED

When compiling the file libs/filesystem/v3/src/path.cpp I get the following error:

 #error both BOOST_FILESYSTEM_DEPRECATED and BOOST_FILESYSTEM_NO_DEPRECATED are defined

The reason for this error is that in filesystem/v3/config.hpp has the following:

// BOOST_FILESYSTEM_DEPRECATED needed for source compiles
# ifdef BOOST_FILESYSTEM_SOURCE
# define BOOST_FILESYSTEM_DEPRECATED
# endif

So i'm puzzled as to why BOOST_FILESYSTEM_DEPRECATED is forced when compiling path.cpp? And how can I avoid theses erros when compiling filesystem V3?

Thanks

Shai

Boost version: 1.49
Compiler: gcc version 4.2.1, Xcode 3.2.5 on Mac OS 10.6.8

 


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net