News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

[SOLVED] Problem with GTK3

Started by Lebuin, September 25, 2012, 12:53:07 PM

Previous topic - Next topic

Lebuin

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
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.

oBFusCATed

Quote from: Lebuin on September 25, 2012, 12:53:07 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.
(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!]

MortenMacFly

Quote from: oBFusCATed on September 25, 2012, 03:12:01 PM
Quote from: Lebuin on September 25, 2012, 12:53:07 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. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

dmoore

hmm... this has bitten me before. Is there any way to flush the cache short of restarting C::B?
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

oBFusCATed

Quote from: 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?
I think, I couldn't find a way to make it flush itself every time the project is rebuilt.
(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!]

stahta01

I would guess closing and reopening the project might do it.

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]

oBFusCATed

Quote from: stahta01 on September 25, 2012, 08:43:56 PM
I would guess closing and reopening the project might do it.

Tim S.
No, it won't
(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!]