[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Trouble with C++ sources about 'using' keyword and conflicting direction
From: |
Anadon |
Subject: |
Trouble with C++ sources about 'using' keyword and conflicting directions between manual and FAQ |
Date: |
Wed, 22 Mar 2023 23:16:02 -0400 |
I am having trouble running `xgettext` on a C++ source file, and it
freaks out when it sees the keyword 'using'. This behavior doesn't
seem to be documented.
```
$ xgettext -C -f src/primes-cli.in.cpp
xgettext: error while opening "// using madlib::primes;" for reading:
No such file or directory
```
I'm also seeing conflicting instructions on how to integrate gettext
at the top of the file.
https://www.gnu.org/software/gettext/manual/gettext.html#Overview
```
#define _(String) (String)
#define N_(String) String
#define textdomain(Domain)
#define bindtextdomain(Package, Directory)
```
which then proceeds to a set of definitions that don't appear to be
complete replacements:
```
#include <libintl.h>
#define _(String) gettext (String)
#define gettext_noop(String) String
#define N_(String) gettext_noop (String)
```
which is different from the FAQ which says to use
https://www.gnu.org/software/gettext/FAQ.html#integrating_howto
```
#include <locale.h>
#include "gettext.h"
#define _(string) gettext (string)
...
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
```
What am I misinterpreting? How do I get this all to work?
- Trouble with C++ sources about 'using' keyword and conflicting directions between manual and FAQ,
Anadon <=