brummer10 / XUiDesigner

A WYSIWYG LV2 GUI/plugin creator tool
BSD Zero Clause License
100 stars 3 forks source link

Build breaks: use of undeclared identifier 'DONT_PROPAGATE'; did you mean 'NO_PROPAGATE' #12

Closed yurivict closed 2 years ago

yurivict commented 2 years ago
cc -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer   -O3 -D_FORTIFY_SOURCE=2 -Wall -fstack-protector -fno-ident -fno-asynchronous-unwind-tables -s -DNDEBUG -DSHARE_DIR=\"/usr/local/share\" ./src/XUiColorChooser.c ./src/XUiConfig.c ./src/XUiControllerType.c ./src/XUiDesigner.c ./src/XUiDraw.c ./src/XUiFileParser.c ./src/XUiGenerator.c ./src/XUiGridControl.c ./src/XUiImageLoader.c ./src/XUiLv2Parser.c ./src/XUiMultiSelect.c ./src/XUiReparent.c ./src/XUiSettings.c ./src/XUiSystray.c ./src/XUiTextInput.c ./src/XUiTurtleView.c ./src/XUiWriteJson.c ./src/XUiWritePlugin.c ./src/XUiWriteTurtle.c ./src/XUiWriteUI.c -L. ../libxputty/libxputty/libxputty.a -o xuidesigner  -fstack-protector-strong  -fPIC -Wl,-z,noexecstack -Wl,--no-undefined -I./include/ -I../libxputty/libxputty/include/ `pkg-config --cflags --libs cairo x11 lilv-0` -lm
./src/XUiDesigner.c:358:36: error: use of undeclared identifier 'DONT_PROPAGATE'; did you mean 'NO_PROPAGATE'?
            designer->ui->flags |= DONT_PROPAGATE;
                                   ^~~~~~~~~~~~~~
                                   NO_PROPAGATE
../libxputty/libxputty/include/xwidget.h:274:5: note: 'NO_PROPAGATE' declared here
    NO_PROPAGATE      = 1<<14,
    ^
./src/XUiDesigner.c:374:36: error: use of undeclared identifier 'DONT_PROPAGATE'; did you mean 'NO_PROPAGATE'?
            designer->ui->flags |= DONT_PROPAGATE;
                                   ^~~~~~~~~~~~~~
                                   NO_PROPAGATE
../libxputty/libxputty/include/xwidget.h:274:5: note: 'NO_PROPAGATE' declared here
    NO_PROPAGATE      = 1<<14,
    ^
./src/XUiDesigner.c:433:9: warning: implicit declaration of function 'widget_draw' is invalid in C99 [-Wimplicit-function-declaration]
        widget_draw(designer->ui, NULL);
        ^
./src/XUiDesigner.c:438:13: warning: implicit declaration of function 'widget_draw' is invalid in C99 [-Wimplicit-function-declaration]
            widget_draw(designer->ui, NULL);
            ^
./src/XUiDesigner.c:448:13: warning: implicit declaration of function 'widget_draw' is invalid in C99 [-Wimplicit-function-declaration]
            widget_draw(designer->ui, NULL);
            ^
./src/XUiDesigner.c:450:37: error: use of undeclared identifier 'DONT_PROPAGATE'; did you mean 'NO_PROPAGATE'?
            designer->ui->flags &= ~DONT_PROPAGATE;
                                    ^~~~~~~~~~~~~~
                                    NO_PROPAGATE
../libxputty/libxputty/include/xwidget.h:274:5: note: 'NO_PROPAGATE' declared here
    NO_PROPAGATE      = 1<<14,
    ^
./src/XUiDesigner.c:462:28: error: use of undeclared identifier 'DONT_PROPAGATE'; did you mean 'NO_PROPAGATE'?
    designer->ui->flags |= DONT_PROPAGATE;
                           ^~~~~~~~~~~~~~
                           NO_PROPAGATE
../libxputty/libxputty/include/xwidget.h:274:5: note: 'NO_PROPAGATE' declared here
    NO_PROPAGATE      = 1<<14,
    ^
./src/XUiDesigner.c:507:13: error: expected expression
            int v = fabs(xmotion->x_root-designer->pos_x) > fabs(xmotion->y_root-designer->pos_y) ? 
            ^
./src/XUiDesigner.c:510:87: error: use of undeclared identifier 'v'
                resize_all_for_type(designer, w, designer->controls[w->data].is_type, v, v);
                                                                                      ^
./src/XUiDesigner.c:510:90: error: use of undeclared identifier 'v'
                resize_all_for_type(designer, w, designer->controls[w->data].is_type, v, v);
                                                                                         ^
./src/XUiDesigner.c:512:73: error: use of undeclared identifier 'v'
                XResizeWindow(w->app->dpy, w->widget, max(10,w->width + v), max(10,w->height + v));
                                                                        ^
./src/XUiDesigner.c:512:73: error: use of undeclared identifier 'v'
./src/XUiDesigner.c:512:96: error: use of undeclared identifier 'v'
                XResizeWindow(w->app->dpy, w->widget, max(10,w->width + v), max(10,w->height + v));
                                                                                               ^
./src/XUiDesigner.c:512:96: error: use of undeclared identifier 'v'
./src/XUiDesigner.c:518:83: error: use of undeclared identifier 'v'
                        XResizeWindow(w->app->dpy, wi->widget, max(10,wi->width + v),
                                                                                  ^
./src/XUiDesigner.c:518:83: error: use of undeclared identifier 'v'
./src/XUiDesigner.c:519:84: error: use of undeclared identifier 'v'
                                                               max(10,wi->height + v));
                                                                                   ^
./src/XUiDesigner.c:519:84: error: use of undeclared identifier 'v'
./src/XUiDesigner.c:525:61: error: use of undeclared identifier 'v'
            adj_set_value(designer->w_axis->adj, w->width + v);
                                                            ^
./src/XUiDesigner.c:529:62: error: use of undeclared identifier 'v'
            adj_set_value(designer->h_axis->adj, w->height + v);
                                                             ^
./src/XUiDesigner.c:843:17: warning: implicit declaration of function 'widget_draw' is invalid in C99 [-Wimplicit-function-declaration]
                widget_draw(designer->ui, NULL);
                ^
./src/XUiDesigner.c:856:9: warning: implicit declaration of function 'widget_draw' is invalid in C99 [-Wimplicit-function-declaration]
        widget_draw(designer->ui, NULL);
        ^
./src/XUiDesigner.c:1113:27: error: use of undeclared identifier 'DONT_PROPAGATE'; did you mean 'NO_PROPAGATE'?
    designer->w->flags |= DONT_PROPAGATE;
                          ^~~~~~~~~~~~~~
                          NO_PROPAGATE
../libxputty/libxputty/include/xwidget.h:274:5: note: 'NO_PROPAGATE' declared here
    NO_PROPAGATE      = 1<<14,
    ^
./src/XUiDesigner.c:1141:5: warning: implicit declaration of function 'combobox_set_menu_size' is invalid in C99 [-Wimplicit-function-declaration]
    combobox_set_menu_size(designer->lv2_names, 24);
    ^
6 warnings and 18 errors generated.
./src/XUiFileParser.c:165:25: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
        fprintf(stderr, buf);
                        ^~~
./src/XUiFileParser.c:165:25: note: treat the string as an argument to avoid this
        fprintf(stderr, buf);
                        ^
                        "%s", 
1 warning generated.
./src/XUiGenerator.c:348:12: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    printf(cmd);
           ^~~
./src/XUiGenerator.c:348:12: note: treat the string as an argument to avoid this
    printf(cmd);
           ^
           "%s", 
./src/XUiGenerator.c:754:13: warning: implicit declaration of function 'widget_hide_all' is invalid in C99 [-Wimplicit-function-declaration]
            widget_hide_all(designer->w);
            ^
2 warnings generated.
./src/XUiMultiSelect.c:36:13: warning: implicit declaration of function 'widget_draw' is invalid in C99 [-Wimplicit-function-declaration]
            widget_draw(wi, NULL);
            ^
./src/XUiMultiSelect.c:143:17: warning: implicit declaration of function 'widget_draw' is invalid in C99 [-Wimplicit-function-declaration]
                widget_draw(wi, NULL);
                ^
./src/XUiMultiSelect.c:166:28: error: use of undeclared identifier 'DONT_PROPAGATE'; did you mean 'NO_PROPAGATE'?
    designer->ui->flags |= DONT_PROPAGATE;
                           ^~~~~~~~~~~~~~
                           NO_PROPAGATE
../libxputty/libxputty/include/xwidget.h:274:5: note: 'NO_PROPAGATE' declared here
    NO_PROPAGATE      = 1<<14,
    ^
2 warnings and 1 error generated.
brummer10 commented 2 years ago

Don't know what goes wrong here, please ensure that libxputty is updated (normally the make file will take care of it). maybe you need to run git submodule update DONT_PROPAGATE is defined here: https://github.com/brummer10/libxputty/blob/master/xputty/header/xwidget.h#L278 combobox_set_menu_size() is here: https://github.com/brummer10/libxputty/blob/master/xputty/widgets/xcombobox.c#L45

but, for warning : implicit declaration of function 'widget_draw' is invalid in C99 I've no idea why? Maybe that resolve when you get a up to date out-check of libxputty. (Still wonder why the implemented status check not work for you)

yurivict commented 2 years ago

Yes, it was an outdated submodule. Sorry for the disturbance!

yurivict commented 2 years ago

Oops.... I closed it too soon.

There are still some errors:

./src/XUiDesigner.c:507:13: error: expected expression
            int v = fabs(xmotion->x_root-designer->pos_x) > fabs(xmotion->y_root-designer->pos_y) ? 
            ^
./src/XUiDesigner.c:510:87: error: use of undeclared identifier 'v'
                resize_all_for_type(designer, w, designer->controls[w->data].is_type, v, v);
                                                                                      ^
./src/XUiDesigner.c:510:90: error: use of undeclared identifier 'v'
                resize_all_for_type(designer, w, designer->controls[w->data].is_type, v, v);
                                                                                         ^
./src/XUiDesigner.c:512:73: error: use of undeclared identifier 'v'
                XResizeWindow(w->app->dpy, w->widget, max(10,w->width + v), max(10,w->height + v));
                                                                        ^
./src/XUiDesigner.c:512:73: error: use of undeclared identifier 'v'
./src/XUiDesigner.c:512:96: error: use of undeclared identifier 'v'
                XResizeWindow(w->app->dpy, w->widget, max(10,w->width + v), max(10,w->height + v));
                                                                                               ^
./src/XUiDesigner.c:512:96: error: use of undeclared identifier 'v'
./src/XUiDesigner.c:518:83: error: use of undeclared identifier 'v'
                        XResizeWindow(w->app->dpy, wi->widget, max(10,wi->width + v),
                                                                                  ^
./src/XUiDesigner.c:518:83: error: use of undeclared identifier 'v'
./src/XUiDesigner.c:519:84: error: use of undeclared identifier 'v'
                                                               max(10,wi->height + v));
                                                                                   ^
./src/XUiDesigner.c:519:84: error: use of undeclared identifier 'v'
./src/XUiDesigner.c:525:61: error: use of undeclared identifier 'v'
            adj_set_value(designer->w_axis->adj, w->width + v);
                                                            ^
./src/XUiDesigner.c:529:62: error: use of undeclared identifier 'v'
            adj_set_value(designer->h_axis->adj, w->height + v);
                                                             ^
13 errors generated.

clang-14 FreeBSD-13.1

brummer10 commented 2 years ago

clang is really picky. :) I see, it's fixed now. regards hermann

yurivict commented 2 years ago

Thanks!