Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error in src/process.cpp when boost <= 1.44.0 #87

Open
ghost opened this issue May 6, 2015 · 0 comments
Open

Compilation error in src/process.cpp when boost <= 1.44.0 #87

ghost opened this issue May 6, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented May 6, 2015

I just tried to compile pion with boost 1.44.0. (I know it is an old version but this specific version is a requirement when building Adobe InDesign CS6 plugins.)
The error is introduced with the following commit:
9a3093d
where a line:
p.make_preferred();
was inserted.

As far as I have understood the boost code, make_preferred() is introduced with v3 of boost::filesystem.
So the line needs to be moved to after the following #if so it only takes effect when compiling with boost versions that use v.3 or higher. For boost version 1.44.0 and earlier which use v2 of boost::filesystem, this does not compile. In v.2 the return p.file_string() routine used in the #else part already does the conversion make_preferred() do in v3, so no changes for v.2 should be necessary.

So the fix should look like:

std::string process::generate_dumpfile_name()
{
...
     p /= ss.str();
     p.normalize();
-    p.make_preferred();

 # if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION >= 3
+    p.make_preferred();
     return p.string();
#else
    return p.file_string();
#endif 

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants