Hello, I am trying to get an old C++ program to compile.... it uses bits of Motif so I'm doing it with MinGW/g++ in cygwin with X11 routines installed.... that seems to be working OK, but I can't compile it for the following error:
error: invalid conversion from ‘const void*’ to ‘void*’
Is that a golden oldie?? Anyhow, the offending bit of code is the last line of this....
Awesome..... here's the rest of the error message (there are others like this but they all have the same pattern)
drawwindow.c++: In function ‘void fuse_dialog(_WidgetRec*)’:
drawwindow.c++:663:5: warning: deprecated conversion from string constant to ‘char*’
drawwindow.c++:663:5: warning: deprecated conversion from string constant to ‘char*’
drawwindow.c++:663:5: warning: deprecated conversion from string constant to ‘char*’
drawwindow.c++:663:5: warning: deprecated conversion from string constant to ‘char*’
drawwindow.c++:663:5: error: invalid conversion from ‘const void*’ to ‘void*’
As for XtPointer, there is no obvious definition in the files I have, but Google gives the following....
The generating of warnings is clear because string lliterals have type const char [] and inside the structure they are assigned to char * instead of const char *. As for void * and const void * I do not see where this conversion is being done.
And I do not understand why you search Google when you have to have include files. Why do you not look through your include files?!