0

Experiencing difficulty in compiling boost.log v1 in my code, though I know that the issue is due to boost.filesystem v3 lack of support. I know I need to #define BOOST_FILESYSTEM_VERSION 2 but where should I define it?

The compilation error:

error: 'external_string_type' is not a member of 'boost::filesystem3::wpath'

#define was added @ path.hpp

Boaz Yaniv
  • 6,334
  • 21
  • 30
freonix
  • 1,605
  • 3
  • 22
  • 35

1 Answers1

3

You can add this preprocessor #define two ways:

a) on the compiler command line, usually something like

-DBOOST_FILESYSTEM_VERSION=2 

b) before including any of the boost filesystem header files in your sources:

#define BOOST_FILESYSTEM_VERSION 2
hkaiser
  • 11,403
  • 1
  • 30
  • 35