Can anybody help to check my Boost code?

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

My environment: Ubuntu 12.04 + libboost1.48-dev ( 1.48.0-3(precise) )
My code patch:
[snip]
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?
Is your compiler giving you errors, or just Eclipse? If the latter, it's an Eclipse configuration problem, which you should ask about on the CDT forums [1] rather than here. Regards, Nate [1] http://www.eclipse.org/forums/index.php?t=thread&frm_id=80

Yes, you are right. It's just Eclipse CDT reporting these warnings/errors. Ok, I'll bug them in Eclipse forum. Cheers Pei On Thu, Jul 19, 2012 at 12:27 PM, Nathan Ridge <zeratul976@hotmail.com>wrote:
My environment: Ubuntu 12.04 + libboost1.48-dev ( 1.48.0-3(precise) )
My code patch:
[snip]
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?
Is your compiler giving you errors, or just Eclipse? If the latter, it's an Eclipse configuration problem, which you should ask about on the CDT forums [1] rather than here.
Regards, Nate
[1] http://www.eclipse.org/forums/index.php?t=thread&frm_id=80
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Pei JIA Email: jp4work@gmail.com cell: +1 604-362-5816 Welcome to Vision Open http://www.visionopen.com
participants (2)
-
JIA Pei
-
Nathan Ridge