Link to home
Start Free TrialLog in
Avatar of Oscurochu
OscurochuFlag for United States of America

asked on

usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lXft

I'm new to programming. I've created a few simple programs on linux, but was never able to create a simple gui on windows. I have installed all of the libraries that cygwin was complaining about... now I get this error:

Jason@jason /cygdrive/c/Documents and Settings/Jason/Desktop
$ gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0`
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find
 -lXft
collect2: ld returned 1 exit status

Here is the source code (example code from gtk.org):

#include <gtk/gtk.h>

int main( int   argc,
          char *argv[] )
{
    GtkWidget *window;
   
    gtk_init (&argc, &argv);
   
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_widget_show  (window);
   
    gtk_main ();
   
    return 0;
}
ASKER CERTIFIED SOLUTION
Avatar of ravenpl
ravenpl
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Oscurochu

ASKER

It compiles without error now, but when I try to run it, I get this error:

(base:5344): Gtk-WARNING **: cannot open display: