I hit an error while compiling the latest source code using an alternative Makefile. The original Makefile builds without this issue.
menu.c:99:16: note: ‘menuCallbackProc’ declared here
99 | typedef void (menuCallbackProc)(Widget, XtPointer, XtPointer);
| ^~~~~~~~~~~~~~~~
menu.c:973:27: error: passing argument 5 of ‘createMenuToggle’ from incompatible pointer type [-Wincompatible-pointer-types]
973 | "Smart", 'm', replaceScopeSmartCB, window,
| ^~~~~~~~~~~~~~~~~~~
| |
| void ()(struct _WidgetRec , WindowInfo , char ) {aka void ()(struct _WidgetRec , struct _WindowInfo , char )}
menu.c:364:41: note: expected ‘menuCallbackProc’ {aka ‘void ()(struct _WidgetRec , void , void )’} but argument is of type ‘void ()(struct _WidgetRec , WindowInfo , char )’ {aka ‘void ()(struct _WidgetRec , struct _WindowInfo , char )’}
364 | char mnemonic, menuCallbackProc callback, void cbArg, int set,
| ~~~~~~~~~~~~~~~~~^~~~~~~~
menu.c:210:13: note: ‘replaceScopeSmartCB’ declared here
210 | static void replaceScopeSmartCB(Widget w, WindowInfo *window, caddr_t callData);
| ^~~~~~~~~~~~~~~~~~~
Here is my Makefile.linux:
The error has nothing to do with my Makefile. As soon as I add "-DREPLACE_SCOPE" to the original Makefile, the error appears.
Thanks for the info. The issue is fixed now.
Thank you for the quick fix.