Skip to content

Compile errors with boost_1_51_0 #30

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

Closed
arkagod opened this issue Sep 24, 2012 · 3 comments
Closed

Compile errors with boost_1_51_0 #30

arkagod opened this issue Sep 24, 2012 · 3 comments

Comments

@arkagod
Copy link

arkagod commented Sep 24, 2012

Error listing from VS

Config.h

define BOOST_FILESYSTEM_VERSION 3


1>.\util\FileUtils.cpp(167) : error C2039: 'wdirectory_iterator' : is not a member of 'boost::filesystem'
1>.\util\FileUtils.cpp(207) : error C2039: 'directory_string' : is not a member of 'boost::filesystem::path'

and more...

@artob
Copy link
Contributor

artob commented Mar 20, 2013

I, too, ran into the very same problem building against Boost 1.50:

[ 70%] Building CXX object src/core/CMakeFiles/lucene++.dir/util/FileUtils.cpp.o
In file included from /usr/include/boost/filesystem/operations.hpp:24:0,
                 from /usr/include/boost/filesystem/convenience.hpp:22,
                 from /src/LucenePlusPlus/src/core/util/FileUtils.cpp:8:
/usr/include/boost/filesystem/config.hpp:16:5: error: #error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
/src/LucenePlusPlus/src/core/util/FileUtils.cpp: In function ‘bool Lucene::FileUtils::listDirectory(const String&, bool, Lucene::HashSet<std::basic_string<wchar_t, std::char_traits<wchar_t>, Lucene::LuceneAllocator<wchar_t> > >)’:
/src/LucenePlusPlus/src/core/util/FileUtils.cpp:167:22: error: ‘wdirectory_iterator’ is not a member of ‘boost::filesystem’
/src/LucenePlusPlus/src/core/util/FileUtils.cpp:167:61: error: expected ‘;’ before ‘dir’
/src/LucenePlusPlus/src/core/util/FileUtils.cpp:167:80: error: ‘dir’ was not declared in this scope
/src/LucenePlusPlus/src/core/util/FileUtils.cpp:167:87: error: ‘wdirectory_iterator’ is not a member of ‘boost::filesystem’
/src/LucenePlusPlus/src/core/util/FileUtils.cpp: In function ‘Lucene::String Lucene::FileUtils::joinPath(const String&, const String&)’:
/src/LucenePlusPlus/src/core/util/FileUtils.cpp:207:29: error: ‘boost::filesystem::wpath’ has no member named ‘directory_string’
/src/LucenePlusPlus/src/core/util/FileUtils.cpp: In function ‘Lucene::String Lucene::FileUtils::extractPath(const String&)’:
/src/LucenePlusPlus/src/core/util/FileUtils.cpp:220:49: error: ‘class boost::filesystem::path’ has no member named ‘directory_string’
/src/LucenePlusPlus/src/core/util/FileUtils.cpp: In function ‘Lucene::String Lucene::FileUtils::extractFile(const String&)’:
/src/LucenePlusPlus/src/core/util/FileUtils.cpp:233:50: error: could not convert ‘boost::filesystem::path::filename() const().boost::filesystem::path::c_str()’ from ‘const value_type* {aka const char*}’ to ‘Lucene::String {aka std::basic_string<wchar_t, std::char_traits<wchar_t>, Lucene::LuceneAllocator<wchar_t> >}’
make[2]: *** [src/core/CMakeFiles/lucene++.dir/util/FileUtils.cpp.o] Error 1
make[1]: *** [src/core/CMakeFiles/lucene++.dir/all] Error 2
make: *** [all] Error 2

The cause is apparently that Boost 1.50 removes the boost::filesystem V2 implementation, meaning that the code in question would need to get rewritten for the V3 API in order for it to work with newer Boost releases.

Downgrading Boost from 1.50 to 1.49 worked around the problem for the time being, enabling the build to complete successfully.

@artob
Copy link
Contributor

artob commented Mar 20, 2013

Looks like @rowanj already worked on a patch for this at: rowanj@5d0117d

artob referenced this issue in rowanj/LucenePlusPlus Mar 20, 2013
The major change is that filesystem3 has only one 'path' type (not wide- or narrow-character variations). Since LucenePlusPlus isolates boost::filesystem interaction in FileUtils, the changes are minor and easy to manage.
@alanw alanw closed this as completed Jul 12, 2013
@trupper
Copy link

trupper commented Aug 1, 2017

When compiling LucenePlusPlus, cmake produces the following errors:
This is a build on Windows 8.1 using Visual Studio 2015.

Could not find the following Boost libraries:

     boost_date_time
     boost_filesystem
     boost_iostreams
     boost_regex
     boost_system
     boost_thread

I've been trying to compile as follows:

cmake -Wno-dev -G "Visual Studio 14 2015 Win64" -DBOOST_LIBRARYDIR=c:\tools\boost_1_64_0\stage\lib -DBOOST_INCLUDE_DIR=c:\tools\boost_1_64_0\boost

and

I've tried setup environment variables, as shown:

set BOOST_ROOT=c:\tools\boost_1_64_0
set BOOST_INCLUDEDIR=c:\tools\boost_1_64_0\boost
set BOOST_LIBRARYDIR=c:\tools\boost_1_64_0\stage\lib

Any help would be appreciated.

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

4 participants