
17 Jun
2005
17 Jun
'05
3:08 p.m.
Phil Richards wrote:
Test regex/grep is failing due to a compilation error with g++ 4.0:
../libs/regex/example/grep/grep.cpp: In function 'int main(int, const char**)': ../libs/regex/example/grep/grep.cpp:130: error: invalid conversion from 'const char**' to 'char**' ../libs/regex/example/grep/grep.cpp:130: error: initializing argument 2 of
'boost::program_options::basic_command_line_parser<charT>::basic_command_line_parser(int,
charT**) [with charT = char]'
This is due to "main" being declared as: int main(int argc, const char * argv[])
And to clarify: the C++ standard says the second argument to main should be char* argv[] Without 'const'. - Volodya