Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse reports warnings
Eclipse reports warnings [message #896829] Thu, 19 July 2012 23:40
JIA Pei is currently offline JIA PeiFriend
Messages: 49
Registered: September 2009
Member



Hi, all:

My environment:
Ubuntu 12.04 + libboost1.48-dev ( 1.48.0-3(precise) )
I've got no idea why Eclipse (the only IDE) reports these warnings to me.


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 in Eclipse IDE at the above 4 lines:

line 1
Quote:
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
Quote:
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
Quote:
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
Quote:
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?
However, why other IDEs or just GCC(G++) won't report these warnings. But the only thing reporting warnings is Eclipse ? I just don't want to see those red alerts in Eclipse IDE.

Can anybody give me a hand?


Best Regards
Pei



Welcome to Vision Open
http://www.visionopen.com
Previous Topic:Step by Step installation guide for Automotive Software Design.
Next Topic:Building a CDT based editor
Goto Forum:
  


Current Time: Fri Dec 19 15:51:45 GMT 2014

Powered by FUDForum. Page generated in 0.03560 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software