Hi, all:

My environment:
Ubuntu 12.04 + libboost1.48-dev ( 1.48.0-3(precise) )

My code patch:
bool VO_IO::ScanDirectory(  const path &dir_path,
                            const string &file_extension,
                            vector<string>& files)
{
    if ( !exists( dir_path ) )
    {
        return false;
    }
    directory_iterator end_itr;
    for ( directory_iterator itr(dir_path); itr != end_itr; ++itr )
    {
        if ( is_directory(itr->status()) )                                           ------ 1
        {
            VO_IO::ScanDirectory(itr->path(), file_extension, files);  ------ 2
        }
        else if ( extension( itr->path() ) == file_extension )              ------ 3
        {
            files.push_back( itr->path().string() );                             ------ 4   
        }
    }
    return true;
}


I got multiple warning/error messages at the above 4 lines:

line 1
a) Invalid arguments '
Candidates are:
bool is_directory(const boost::filesystem3::path &, boost::system::error_code &)
bool is_directory(boost::filesystem3::file_status)
bool is_directory(const boost::filesystem3::path &)
'
b)  Method 'status' could not be resolved
 
line 2
a) Invalid arguments '
Candidates are:
bool ScanDirectory(const boost::filesystem3::path &, const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>> &)
'
b) Method 'path' could not be resolved

line 3
a) Invalid arguments '
Candidates are:
std::basic_string<char,std::char_traits<char>,std::allocator<char>> extension(const boost::filesystem3::path &)
'
b) Method 'path' could not be resolved

line 4 
a) Invalid arguments '
Candidates are:
void push_back(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &)
b) Method 'path' could not be resolved
c) Method 'string' could not be resolved


It seems filesystem v3 conflicts with original fliesystem?
Anyway, I just don't want to see those red alerts in Eclipse IDE.

Can anybody give me a hand?

Cheers
Pei




--

Pei JIA

Email: jp4work@gmail.com
cell:    +1 604-362-5816

Welcome to Vision Open
http://www.visionopen.com