Re: 0.24.2 Error compiling control-center



>I am using gcc 2.95.3

>gnome-settings-xrdb.c: In function `append_xresources':
>gnome-settings-xrdb.c:264: parse error before `char'
>gnome-settings-xrdb.c:265: `xresources' undeclared (first use >in this 
>function)gnome-settings-xrdb.c:265: (Each undeclared >identifier is 
>reported only once
>gnome-settings-xrdb.c:265: for each function it appears in.)
>make[5]: *** [gnome-settings-xrdb.o] Error 1


I have had the same errors (among others).

>Do you have any ideas?

Change the following code in gnome-settings-xrdb.c to make it compile:

--------------
static void
append_xresources (GString *string, GError **error)
{
	const char* home_path;

	g_return_if_fail (string != NULL);

	home_path = g_get_home_dir ();
	if (home_path == NULL) {
		g_warning (_("Cannot determine user's home directory"));
		return;
	}
	char *xresources = g_build_filename (home_path, USER_X_RESOURCES,
NULL);
--------------


into

---------------
static void
append_xresources (GString *string, GError **error)
{
	const char* home_path;
	char *xresources; 

	g_return_if_fail (string != NULL);

	home_path = g_get_home_dir ();
	if (home_path == NULL) {
		g_warning (_("Cannot determine user's home directory"));
		return;
	}
	xresources = g_build_filename (home_path, USER_X_RESOURCES, NULL);
-----------------

(In C, your variables should be declared at the top of the function.)

This worked for me. I am still compiling myself, but normally changing
these two lines of code should have no effect.

Cheers,
Kris
-- 
Kris Luyten
Expertisecentrum Digitale Media - Limburgs Universitair Centrum
Wetenschapspark 2  3590 Diepenbeek (Belgium)
tel.: +32 (0)11 268411 
email: kris luyten luc ac be
PGP-key: http://lumumba.luc.ac.be/kris/kris-pub.txt
homepage: http://lumumba.luc.ac.be/kris/




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