bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64006] *printf() defines break C++ builds (specifically Qt)


From: Pierre Ossman
Subject: [bug #64006] *printf() defines break C++ builds (specifically Qt)
Date: Thu, 6 Apr 2023 04:52:39 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?64006>

                 Summary: *printf() defines break C++ builds (specifically Qt)
                   Group: GNU gettext
               Submitter: cendossm
               Submitted: Thu 06 Apr 2023 08:52:37 AM UTC
                Category: Programmer interface
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 06 Apr 2023 08:52:37 AM UTC By: Pierre Ossman <cendossm>
gettext tries to redirect the various *printf() functions to its own
implementation if the platform version doesn't comply to the POSIX behaviour.

Unfortunately, it does this using #define:s, which isn't very compatible with
C++ and the namespacing there. It is more careful about C++ when handling the
various *gettext() functions, but not here.

A specific scenario where this breaks is when using Qt's QString::asprintf():

D:/a/tigervnc/tigervnc/vncviewer/vncconnection.cxx:1727:24: error:
'libintl_asprintf' is not a member of 'QString'
 1727 |   infoText += QString::asprintf(_("Security method: %s\n"),
rfb::secTypeName(m_securityType));
      |                        ^~~~~~~~
make[2]: *** [vncviewer/CMakeFiles/vncviewer.dir/build.make:255:
vncviewer/CMakeFiles/vncviewer.dir/vncconnection.cxx.obj] Error 1

More complete build log here:

https://github.com/CendioOssman/tigervnc/actions/runs/4626832263/jobs/8184028650







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64006>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]