Author Topic: Can't use gtkmm with Code::Blocks  (Read 646 times)

Offline alexmmusic

  • Single posting newcomer
  • *
  • Posts: 3
Can't use gtkmm with Code::Blocks
« on: August 27, 2022, 04:31:31 pm »
Hi there!

I'm trying to learn gtkmm in Ubuntu, and I installed code::blocks because I don't want to compile with the terminal all the times.

I have tried to use the IDE for console app and it works fine, but when I try to use gtkmm it doesn't work because the compiler can't find the header files.

I'm sure I have installed gtkmm (I confirmed it with gpdk - L (...)).

In compiler settings -> Search directories I did include /usr/include/gtkmm-3.0 BUT I wrote it on my own because code::blocks didn't show it in the explorer (for sure the problem is related with it)

in Linker settings -> Other linker options I have this: `pkg-config gtkmm-3.0 --cflags --libs`

With all of this, the compiler still can't find the header files.

I have tried with #include <gtkmm-3.0/gtkmm.h> and #include <gtkmm.h> and none work.

I need help, I'm breaking my head with this.

Thanks a lot

Note: it compile and works in the terminal
« Last Edit: August 27, 2022, 04:55:05 pm by alexmmusic »

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1204
Re: Can't use gtkmm with Code::Blocks
« Reply #1 on: August 27, 2022, 05:09:52 pm »
Are you using Flatpak?

Offline alexmmusic

  • Single posting newcomer
  • *
  • Posts: 3
Re: Can't use gtkmm with Code::Blocks
« Reply #2 on: August 27, 2022, 05:13:02 pm »
I think I'm not

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1204
Re: Can't use gtkmm with Code::Blocks
« Reply #3 on: August 27, 2022, 05:35:12 pm »
How did you install Code::Blocks?

Offline alexmmusic

  • Single posting newcomer
  • *
  • Posts: 3
Re: Can't use gtkmm with Code::Blocks
« Reply #4 on: August 27, 2022, 05:56:29 pm »
How did you install Code::Blocks?

via the elementary OS app center (I'm actually working with this OS)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7323
    • My Best Post
Re: Can't use gtkmm with Code::Blocks
« Reply #5 on: August 28, 2022, 06:47:29 am »
Code
`pkg-config gtkmm-3.0 --cflags --libs`

The above is likely wrong!

What likely needs to be in compiler
Code
`pkg-config gtkmm-3.0 --cflags`

What likely needs to be in linker
Code
`pkg-config gtkmm-3.0 --libs`

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