Author Topic: Problems compiling C::B source code  (Read 4372 times)

Offline diehard2

  • Single posting newcomer
  • *
  • Posts: 3
Problems compiling C::B source code
« on: October 19, 2011, 07:48:29 pm »
Hello, I got the latest svn code, and installed all of the dev packages I should need to build codeblocks. I've run bootstrap, ./configure, and make. I'm getting an error

notebookstyles.cpp:19:25: fatal error: gtk/gtk.h: No such file or directory

I have in my usr/include gtk-2.0

Sorry if this is easy to fix (I'm new at developing in Linux), but how do I get C::B to compile. Thanks for any help.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Problems compiling C::B source code
« Reply #1 on: October 19, 2011, 08:11:21 pm »
Your system might miss the
Code: [Select]
pkg-config package.
If that's the case you should get an error if you run ./configure.
I will correct it this eveneing.

If you have pkg-config installed, something different went wrong.

Offline diehard2

  • Single posting newcomer
  • *
  • Posts: 3
Re: Problems compiling C::B source code
« Reply #2 on: October 19, 2011, 08:38:40 pm »
Hi, I have the latest version of pkg-config. I'm running ubuntu 11.1. I attached the output of configure. Thanks for the help.

« Last Edit: October 19, 2011, 09:00:11 pm by diehard2 »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9612
Re: Problems compiling C::B source code
« Reply #3 on: October 19, 2011, 08:43:54 pm »
Jens, in this log I see this entry:
checking for wxWidgets version >= 2.8.0... yes (version 2.8.11)
I believe this is not good. IMHO C::B needs at least wxWidgets 2.8.9 (IIRC) to compile / work, it might even be 2.8.10. You might check this out, too.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Problems compiling C::B source code
« Reply #4 on: October 19, 2011, 08:59:24 pm »
Jens, in this log I see this entry:
checking for wxWidgets version >= 2.8.0... yes (version 2.8.11)
I believe this is not good. IMHO C::B needs at least wxWidgets 2.8.9 (IIRC) to compile / work, it might even be 2.8.10. You might check this out, too.
I will do, and I know the cause for the error.
A fix comes soon.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Problems compiling C::B source code
« Reply #5 on: October 20, 2011, 12:32:18 am »
Should be fixed in svn r7504.

wxWidgets now has to be at least 2.8.8.

The other issue should be fixed also.
the use of gtk-notebook can be disabled,  if ./configure is run with --enable-gtk-notebook=no or --disable-getk-notebook (see ./configure --help).

Don't forget to run ./bootstrap and ./configure again.
Maybe a make clean is also needed, at least src/src/main.o and src/src/notebookstyles.o (if they exist) should be removed.

Offline diehard2

  • Single posting newcomer
  • *
  • Posts: 3
Re: Problems compiling C::B source code
« Reply #6 on: October 20, 2011, 11:39:11 pm »
Thanks, its fixed