gengetopt and g++4.4.1 constness error

View: New views
1 Messages — Rating Filter:   Alert me  

gengetopt and g++4.4.1 constness error

by alex31 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have updgraded my box, and have now gcc 4.4.1 as default.

when compiling the .c/.h generated by gengetopt (gengetopt-2.22.3 as pakaged by mandriva) , i have theses errors compiling internal gengetopt function with g++ :


cglCmdLine.c: In function ‘char* get_multiple_arg_token(const char*)’:
cglCmdLine.c:354: erreur: invalid conversion from ‘const char*’ to ‘char*’
cglCmdLine.c: In function ‘char* get_multiple_arg_token_next(const char*)’:
cglCmdLine.c:404: erreur: invalid conversion from ‘const char*’ to ‘char*’

with previous g++ 4.3.1 version, it was compiling without a warning.

if i compile with gcc (not g++), it works, but, since it's a c++ project,  i need to put a specific rule in my makefile to compile gengetopt generated files.

Alexandre