Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Dev C++ And GTK Trouble  (Read 3522 times)

0 Members and 1 Guest are viewing this topic.

Ryder17z

    Topic Starter


    Intermediate
  • Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 10
Dev C++ And GTK Trouble
« on: October 26, 2009, 08:03:24 AM »
I downloaded a bundle of GTK, extracted it, then tried it..

Test code used:

Code: [Select]
#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;
}

Compiler returns this:

Quote
1 C:\Dev-Cpp\Test\Main.cpp gtk/gtk.h: No such file or directory.
 C:\Dev-Cpp\Test\Main.cpp In function `int main(int, char**)':
5 C:\Dev-Cpp\Test\Main.cpp `GtkWidget' undeclared (first use this function)
  (Each undeclared identifier is reported only once for each function it appears in.)
5 C:\Dev-Cpp\Test\Main.cpp `window' undeclared (first use this function)
7 C:\Dev-Cpp\Test\Main.cpp `gtk_init' undeclared (first use this function)
9 C:\Dev-Cpp\Test\Main.cpp `GTK_WINDOW_TOPLEVEL' undeclared (first use this function)
9 C:\Dev-Cpp\Test\Main.cpp `gtk_window_new' undeclared (first use this function)
10 C:\Dev-Cpp\Test\Main.cpp `GTK_WINDOW' undeclared (first use this function)
10 C:\Dev-Cpp\Test\Main.cpp `gtk_window_set_title' undeclared (first use this function)
11 C:\Dev-Cpp\Test\Main.cpp `gtk_window_set_default_size' undeclared (first use this function)
12 C:\Dev-Cpp\Test\Main.cpp `GTK_WIN_POS_CENTER' undeclared (first use this function)
12 C:\Dev-Cpp\Test\Main.cpp `gtk_window_set_position' undeclared (first use this function)
13 C:\Dev-Cpp\Test\Main.cpp `gtk_widget_show' undeclared (first use this function)
15 C:\Dev-Cpp\Test\Main.cpp `G_OBJECT' undeclared (first use this function)
16 C:\Dev-Cpp\Test\Main.cpp `gtk_main_quit' undeclared (first use this function)
16 C:\Dev-Cpp\Test\Main.cpp `G_CALLBACK' undeclared (first use this function)
16 C:\Dev-Cpp\Test\Main.cpp `NULL' undeclared (first use this function)
16 C:\Dev-Cpp\Test\Main.cpp `g_signal_connect_swapped' undeclared (first use this function)
18 C:\Dev-Cpp\Test\Main.cpp `gtk_main' undeclared (first use this function)
 C:\Dev-Cpp\Test\Makefile.win [Build Error]  [Main.o] Error 1

I have tried altering project properties, but it gives the same errors

How do I make it work?
The cake is a lie...

Ryder17z

    Topic Starter


    Intermediate
  • Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 10
Re: Dev C++ And GTK Trouble
« Reply #1 on: October 29, 2009, 05:32:02 PM »
Sorry for double posting..

But can anyone help me with it?
The cake is a lie...