By kristinu
I am having a problem with this code giving me
Code:
xbuplot.c: In function ‘void xbuinit_(float*, float*)’:
xbuplot.c:213:63: error: invalid conversion from ‘const char**’ to ‘char**’ [-fpermissive]
In file included from xbuplot.c:2:0:
/usr/include/X11/Xutil.h:727:15: error: initializing argument 1 of ‘int XStringListToTextProperty(char**, int, XTextProperty*)’ [-fpermissive]
xbuplot.c:220:59: error: invalid conversion from ‘const char**’ to ‘char**’ [-fpermissive]
In file included from xbuplot.c:2:0:
/usr/include/X11/Xutil.h:727:15: error: initializing argument 1 of ‘int XStringListToTextProperty(char**, int, XTextProperty*)’ [-fpermissive]
Code:
const char* icon_name = "Xbuplot";
const char* window_name = "Xbuplot";
if (XStringListToTextProperty (&window_name, 1, &windowName ) == 0) {
(void) fprintf (stderr, "ERROR: structure allocation for windowName failed.n");
exit(-1);
}
if (XStringListToTextProperty (&icon_name, 1, &iconName ) == 0) {
(void) fprintf (stderr, "ERROR: structure allocation for iconName failed.n");
exit(-1);
}