gettext on the debian machine .... doesn't work ....

Hi,

did someone manage to make the gettext function working ?

a simple hello world :

#include <locale.h>
#include “gettext.h”

int
main (void)

{

setenv (“LANGUAGE”, “fr”, 1);

setlocale (LC_ALL, “”);
bindtextdomain (“toto”, “/foo/bar/baz”);
textdomain (“toto”);
gettext (“toto”);
return 0;
}

$ gcc -DENABLE_NLS=1 -I/usr/share/gettext -o test-gettext test-gettext.c
$ strace -e trace=open ./test-gettext

just return

open(“/etc/ld.so.cache”, O_RDONLY) = 3
open(“/lib/arm-linux-gnueabihf/libc.so.6”, O_RDONLY) = 3

I don’t see any trace like this one :

open(“/etc/ld.so.cache”, O_RDONLY|O_CLOEXEC) = 3
open(“/lib64/libc.so.6”, O_RDONLY|O_CLOEXEC) = 3
open(“/usr/lib/locale/locale-archive”, O_RDONLY|O_CLOEXEC) = 3
open(“/usr/share/locale/locale.alias”, O_RDONLY|O_CLOEXEC) = 3
open(“/foo/bar/baz/fr/LC_MESSAGES/toto.mo”, O_RDONLY) = -1 ENOENT (No such file or directory)

Why ? Any idea ?

Thx,