Re: [gnome-love] natilus text component compilation issues.



On Thu, 2001-11-29 at 16:45, Josh Steiner wrote:
Hey y'all, I've started trying to get the Nautilus text view component to
compile and am I'm getting hung up on this error:

nautilus-text-view.c: In function `get_selected_text':
nautilus-text-view.c:479: dereferencing pointer to incomplete type
nautilus-text-view.c:479: dereferencing pointer to incomplete type
nautilus-text-view.c:479: dereferencing pointer to incomplete type
nautilus-text-view.c:483: dereferencing pointer to incomplete type
nautilus-text-view.c:483: dereferencing pointer to incomplete type
nautilus-text-view.c: In function `update_service_menu_items':
nautilus-text-view.c:748: dereferencing pointer to incomplete type
nautilus-text-view.c:748: dereferencing pointer to incomplete type
nautilus-text-view.c:748: dereferencing pointer to incomplete type
make[1]: *** [nautilus-text-view.o] Error 1
make[1]: Leaving directory `/gnome/head/cvs/nautilus/components/text'
make: *** [all-recursive] Error 1

in the fucntion:

static char *
get_selected_text (GtkEditable *text_widget)
{
  if (!text_widget->has_selection || text_widget->selection_start_pos == 
    text_widget->selection_end_pos) {
  
    return NULL;
  }
  
  return gtk_editable_get_chars (text_widget, 
    text_widget->selection_start_pos, text_widget->selection_end_pos);
}

This is a common C problem. What it means is that C does not know the
structure of GtkEditable, so when it reaches : text_widget->some_member
it does not know what to do with it. The solution would be to make the
structure available to this code so that it can calculate the offsets
correctly.

However I would guess that this code is already including <gnome.h> or
<gtk.h> and i don't see how anybody else could compile this code. This
might be that you are trying to compile nautilus for gnome 2.0 with gtk
1.2, or that gcc is finding the gnome 1.4 headers before the 2.0 ones.
If you got the code from cvs make sure you have the right branch.

regards,
Chema





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