News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

GTK3 new project "Script error"

Started by Sparkye, February 17, 2014, 12:28:32 PM

Previous topic - Next topic

Sparkye

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?)

Sparkye

Used GTK+ 32bit and everything works fine now, just wonder why  ???

stahta01

Quote from: Sparkye on February 17, 2014, 04:42:06 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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

John_Conner

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

oBFusCATed

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!]