Author Topic: [SOLVED] Problem with GTK3  (Read 11477 times)

Lebuin

  • Guest
[SOLVED] Problem with GTK3
« 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.
« Last Edit: September 25, 2012, 12:56:46 pm by Lebuin »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: [SOLVED] Problem with GTK3
« Reply #1 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.
(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!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: [SOLVED] Problem with GTK3
« Reply #2 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. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: [SOLVED] Problem with GTK3
« Reply #3 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: [SOLVED] Problem with GTK3
« Reply #4 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.
(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!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: [SOLVED] Problem with GTK3
« Reply #5 on: September 25, 2012, 08:43:56 pm »
I would guess closing and reopening the project might do it.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: [SOLVED] Problem with GTK3
« Reply #6 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
(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!]