zhao
zhao

Reputation: 43

error C2059: syntax error : 'generic'

When I want to use boost library in my code, and I found an error:

error C2059: syntax error : 'generic'

And this error is coming from the boost/filesystem/path.hpp,

path generic() const
{
...
}

And I don't know how to solve it, I google it and it looks like I need to redefine it. But I really don't know how to do it.

Upvotes: 3

Views: 3115

Answers (1)

boglode
boglode

Reputation: 41

Try setting: BOOST_FILESYSTEM_NO_DEPRECATED in Visual Studio Preprocessor Definitions as you can see in the following image:

Preprocessor Definitions configuration page in Visual Studio

Upvotes: 4

Related Questions