Menu

#205 After commits r3677 and r3676 compile error

v1.0_(example)
open
nobody
None
1
2025-04-29
2025-04-28
No

Hello Itamar,
now i got an error compile on Ubuntu:

drawtext.c: In function ‘HB_FUN_HWG_DRAWTEXT’:
drawtext.c:97:44: error: ‘PANGO_WRAP_NONE’ undeclared (first use in this function); did you mean ‘PANGO_WRAP_WORD’?
97 | pango_layout_set_wrap(hDC->layout, PANGO_WRAP_NONE);
| ^~~~~~~~~~~~~~~
| PANGO_WRAP_WORD
drawtext.c:97:44: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile.linux:40: ../../obj/drawtext.o] Fehler 1

The Ubuntu is recent.

https://docs.gtk.org/Pango/enum.WrapMode.html
PANGO_WRAP_NONE

Do not wrap.

    Value: 3
    Available since: 1.56

Here the data of the machine:
name -a
Linux afu-TUXEDO-Pulse-14-Gen1 6.8.0-110052-tuxedo #53tux1 SMP PREEMPT_DYNAMIC Fri Jan 17 17:27:02 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
hostnamectl
Static hostname: afu-TUXEDO-Pulse-14-Gen1
Icon name: computer-laptop
...
Operating System: Ubuntu 24.04.1 LTS
Kernel: Linux 6.8.0-110052-tuxedo
Architecture: x86-64

Need to check for pango revision ?

With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried

Discussion

  • Itamar M. Lins Jr.

    Hi!

    Kubuntu 25.04

    Here pango version is:
    dev/hwgui/source/gtk$ pkg-config --modversion pango
    1.56.3
    dev/hwgui/source/gtk$ pkg-config --modversion gtk+-2.0
    2.24.33

    I'm checking in which version this directive appears, here it's compiling normally.

    Best regards,
    Itamar M. Lins Jr.

     
    • Itamar M. Lins Jr.

      Hi!
      Found here!

      itamar@itamar-desktop:/usr/include/pango-1.0/pango$ grep -i 'PANGO_WRAP' *.h
      pango-enum-types.h:GType pango_wrap_mode_get_type (void) G_GNUC_CONST;
      pango-enum-types.h:#define PANGO_TYPE_WRAP_MODE (pango_wrap_mode_get_type ())
      pango-layout.h: * @PANGO_WRAP_WORD: wrap lines at word boundaries.
      pango-layout.h: * @PANGO_WRAP_CHAR: wrap lines at character boundaries.
      pango-layout.h: * @PANGO_WRAP_WORD_CHAR: wrap lines at word boundaries, but fall back to
      pango-layout.h: * For @PANGO_WRAP_WORD, Pango uses break opportunities that are determined
      pango-layout.h: * by the Unicode line breaking algorithm. For @PANGO_WRAP_CHAR, Pango allows
      pango-layout.h: * PANGO_WRAP_NONE:
      pango-layout.h:  PANGO_WRAP_WORD,
      pango-layout.h:  PANGO_WRAP_CHAR,
      pango-layout.h:  PANGO_WRAP_WORD_CHAR,
      pango-layout.h:  PANGO_WRAP_NONE PANGO_AVAILABLE_ENUMERATOR_IN_1_56
      

      Best regards,
      Itamar M. Lins Jr.

       
      • Itamar M. Lins Jr.

        Hi!
        The function dratext.c

        #include "gtk/gtk.h" 
        file gtk.h load:
        #include <gdk/gdkcairo.h> 
        file gdkcairo.h load:
         #include <pango/pangocairo.h>
        file pangocairo.h load:
         #include <pango/pango.h> 
        file pango.h load:
         #include <pango/pango-layout.h>
        
        **
         * PANGO_WRAP_NONE:
         *
         * do not wrap.
         *
         * Since: 1.56
         */
        typedef enum {
          PANGO_WRAP_WORD,
          PANGO_WRAP_CHAR,
          PANGO_WRAP_WORD_CHAR,
          PANGO_WRAP_NONE PANGO_AVAILABLE_ENUMERATOR_IN_1_56
        } PangoWrapMode;
        

        Best regards,
        Itamar M. Lins Jr.

         

        Last edit: Itamar M. Lins Jr. 2025-04-28
  • Wilfried Brunken

    Hello Itamar,
    now can compile and my program CLLOG runs also OK.

    Runing following test program
    test/ticketsticket204.prg
    i got a lot of messages:

    Error: Empty text in HWG_DRAWTEXT
    Error: Empty text in HWG_DRAWTEXT
    Error: Empty text in HWG_DRAWTEXT

    it was fired in drawtext.c about line 127,
    Why ?

    With regards,
    MNI TNX, 73 es 55 de
    DF7BE, Wilfried

     

Log in to post a comment.