Author Topic: GTK3 new project "Script error"  (Read 11858 times)

Offline Sparkye

  • Single posting newcomer
  • *
  • Posts: 2
GTK3 new project "Script error"
« on: February 17, 2014, 12:28:32 pm »
Hello guys,
first of all, I must say that I am a complete newb in this.
I have downloaded the GTK+ bundle from http://www.gtk.org/download/win64.php extracted it to C:\gtk
Added User variable gdk-pixbuf with value C:\gtk\include\gdk-pixbuf-2.0
and variable gtk with value of C:\gtk
at the end of system variable Path I added ;C:\gtk\bin
In Code::Blocks I have added `pkg-config --cflags gtk+-3.0` to Settings->Compiler...->Compiler settings->Other options (which was blank before)
and also `pkg-config --libs gtk+-3.0` to to Settings->Compiler...->Linker settings->Other linker options

When I try to create new GTK+ project, I chose path and than I am asked to fill GTK's location, so I have inserted C:\gtk (which is where I have extracted the downloaded bundle). The problem is, I keep getting an error:
Script error
The path you entered seems valid, but this wizard can't locate the following GTK's include file: gtk.h in it

I have checked and the gtk.h is present in C:\gtk\include\gtk-3.0\gtk

Windows 7 64bit, Code::Blocks 12.11
Does anyone have an idea what am I doing wrong?

Thanks in advance

P.S: I hope this is right section. If not, please move it where it belongs.

Edit: I have edited the GTK+ wizard script and replaced "gtk2.0" with "gtk3.0" where it was necessary and it works, but now when I try to compile the source that I get generated by the Code::Blocks wizard, I keep getting error:
C:\gtk\lib\glib-2.0\include\glibconfig.h|57|error: ISO C90 does not support 'long long' [-Wlong-long]| ||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|
(which I guess does not belong in this board, but does anyone have an idea what to do with it?)
« Last Edit: February 17, 2014, 12:45:53 pm by Sparkye »

Offline Sparkye

  • Single posting newcomer
  • *
  • Posts: 2
Re: GTK3 new project "Script error"
« Reply #1 on: February 17, 2014, 04:42:06 pm »
Used GTK+ 32bit and everything works fine now, just wonder why  ???

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6506
    • My Best Post
Re: GTK3 new project "Script error"
« Reply #2 on: February 17, 2014, 06:12:59 pm »
Used GTK+ 32bit and everything works fine now, just wonder why  ???

Windows and Linux treated 32/64 bit change in different ways; either Windows or the Compiler is NOT doing it the same way as GTK3 expected.

Could also be user error on doing the CB Project settings.

Tim S.


C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

John_Conner

  • Guest
Re: GTK3 new project "Script error"
« Reply #3 on: June 22, 2014, 06:03:55 pm »
While I was searching for a solution to this exact problem, I never came across a solution...However, I did figure it out myself and it required (After correctly installing GTK+ 3.0 on my system) to edit the GTK+ Project script for Code::Blocks 13.12...I won't rewrite it here but I will give you the link to my post on StackOverflow http://stackoverflow.com/questions/24339805/how-to-fix-the-codeblocks-wizard-to-look-for-gtk-3-0-and-not-2-0/24340596#24340596

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11714
    • Travis build status
Re: GTK3 new project "Script error"
« Reply #4 on: June 22, 2014, 06:57:57 pm »
Can you provide a diff againts the latest version of this script that is available in trunk?

See here how to make it: http://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_to_BerliOS_%28Patch_Tracker%29
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]