Author Topic: GTK on Windows  (Read 4427 times)

Offline Deith

  • Single posting newcomer
  • *
  • Posts: 2
GTK on Windows
« on: December 18, 2010, 02:13:41 pm »
Yes, i've searched forum and i got A LOT of topics with my problem but none got answered so i make another one hoping someone will help me to solve that problem. I've downloaded the GTK bundle for Win64 (32bit too) from here -
- Unzip
- Copy all to C:\Program Files(x86)\CodeBlocks\MiniGW\..
- Run program, type:
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);


  return 0;
And got error:
error: gtk/gtk.h: No such file or directory|
So i created new directory in C:\Program Files(x86)\CodeBlocks\.. called "gtk" and copied all files into there but still i got same error. So i runed CB, entered "Settings>Compiler and Debugger>Search directories" and started to adding everything from gtk folder (both for compiler and linker). When i reached:

Compiler started to make a lot more errors:

So the adding process got harder, i had to add every i started thinking - wait, it's insane, it should be another way. So that's the reason i've made this topic. Is it any NORMAL way to make GTK working on Windows 7 64bit? And how to achieve that

Offline stahta01

  • Lives here!
  • ****
  • Posts: 4926
    • My Best Post
Re: GTK on Windows
« Reply #1 on: December 18, 2010, 04:01:39 pm »
Turn ON Full Compiler Logging.

And, find a group that supports your Compiler, OS, and GTK Library.

With the full build log they should be able to help you add the correct include headers.

Tim S.

C Programmer working to learn more about C++.
On Win7, compiling CB Trunk against wxWidgets WX_3_0_BRANCH branch.
On Debian Jessie, compiling CB Trunk against wxWidgets 2.8.12.
When in doubt, read the CB WiKi FAQ.

Offline Deith

  • Single posting newcomer
  • *
  • Posts: 2
Re: GTK on Windows
« Reply #2 on: December 18, 2010, 05:55:59 pm »
It give me NO clue what to do with that. I'm not that familiar with CB and compiler/linker options...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 8545
Re: GTK on Windows
« Reply #3 on: December 18, 2010, 06:40:04 pm »
Do you know what flags you should pass to the compiler/linker?
If you know we can help you.
If not go ask your question in general programming forum/mailing list or read the documentation of your compiler!
<debugger plugin maintainer>
(most of the time I ignore long posts)