Code::Blocks Forums

User forums => Help => Topic started by: Lebuin on September 25, 2012, 12:53:07 pm

Title: [SOLVED] Problem with GTK3
Post by: Lebuin on September 25, 2012, 12:53:07 pm
Hi,

I just started using Codeblocks to create a GTK3 application. Unfortunately, while compiling, Code::Blocks keeps giving me the error: "fatal error: gtk/gtk.h: No such file or directory"

I have added `pkg-config --cflags gtk+-3.0` to the compiler options and `pkg-config --libs gtk+-3.0` to the linker options. When I change these two options to gtk+-2.0, compiling is successfull. Also, compiling on the command line with
Code
gcc `pkg-config --cflags gtk+-3.0` -o hello hello.c `pkg-config --libs gtk+-3.0`
does work. What might be the problem here?

<i>Edit:</i> closing and reopening Code::Blocks solved my problem. Maybe because I installed GTK3 while Code::Blocks was already opened. Anyway, this is solved.
Title: Re: [SOLVED] Problem with GTK3
Post by: oBFusCATed on September 25, 2012, 03:12:01 pm
<i>Edit:</i> closing and reopening Code::Blocks solved my problem. Maybe because I installed GTK3 while Code::Blocks was already opened. Anyway, this is solved.
Yes, C::B caches the results from backtick expressions.
Title: Re: [SOLVED] Problem with GTK3
Post by: MortenMacFly on September 25, 2012, 06:14:52 pm
<i>Edit:</i> closing and reopening Code::Blocks solved my problem. Maybe because I installed GTK3 while Code::Blocks was already opened. Anyway, this is solved.
Yes, C::B caches the results from backtick expressions.
...but not across sessions. ;-)
Title: Re: [SOLVED] Problem with GTK3
Post by: dmoore on September 25, 2012, 07:36:50 pm
hmm... this has bitten me before. Is there any way to flush the cache short of restarting C::B?
Title: Re: [SOLVED] Problem with GTK3
Post by: oBFusCATed on September 25, 2012, 07:48:40 pm
hmm... this has bitten me before. Is there any way to flush the cache short of restarting C::B?
I think, I couldn't find a way to make it flush itself every time the project is rebuilt.
Title: Re: [SOLVED] Problem with GTK3
Post by: stahta01 on September 25, 2012, 08:43:56 pm
I would guess closing and reopening the project might do it.

Tim S.
Title: Re: [SOLVED] Problem with GTK3
Post by: oBFusCATed on September 25, 2012, 09:18:55 pm
I would guess closing and reopening the project might do it.

Tim S.
No, it won't