Re: Compiling gvfs-open.c : GVFS_LOCALEDIR undeclared error



Hi Hakon,

see programs/Makefile.am:
AM_CPPFLAGS =                                      \
   -I$(top_srcdir)                         \
   -I$(top_builddir)                       \
   $(GLIB_CFLAGS)                          \
   -DGVFS_LOCALEDIR=\""$(localedir)"\"

So it should work if you add something like -DGVFS_LOCALEDIR=\""/usr/share/locale"\"...

Regards

Ondrej


2016-05-25 0:53 GMT+02:00 Håkon Hægland <hakon hagland gmail com>:
Hi. I am trying to compile gvfs-open.c after cloning the git repo
(git://git.gnome.org/gvfs). I am on Ubuntu 16.04. 

$ uname -a
Linux hakon-ThinkPad-Edge-E540 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I first run ./autogen.sh, then ./configure --prefix=my_custom_dir. ( I also did "make" and "make install" to check that everything worked )

Then I installed the most recent version of glib, and after that I copied 

config.h
programs/gvs-open.c 

to a custom directory and tried to compile gvfs-open.c using gcc :


LD_LIBRARY_PATH="$GLIB_DIR/lib" gcc gvfs-open.c -I"$GLIB_DIR/include/glib-2.0" \
 -I"$GLIB_DIR/lib/glib-2.0/include/" -I"$GLIB_DIR/include/gio-unix-2.0" -I./ \
 -o gvfs-open -lglib-2.0


where "$GLIB_DIR" is the directory where I installed glib.
The error message from gcc is:


gvfs-open.c: In function ‘main’:
gvfs-open.c:119:36: error: ‘GVFS_LOCALEDIR’ undeclared (first use in this function)
   bindtextdomain (GETTEXT_PACKAGE, GVFS_LOCALEDIR);
                                    ^
gvfs-open.c:119:36: note: each undeclared identifier is reported only once for each function it appears in



Unfortunately, I have no clue why GVFS_LOCALEDIR is undeclared. Maybe it should be defined in config.h ? Any suggestions are appreciated.

Best regards,
Håkon Hægland

_______________________________________________
gvfs-list mailing list
gvfs-list gnome org
https://mail.gnome.org/mailman/listinfo/gvfs-list




--
Regards

Ondrej


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