Code::Blocks Forums

User forums => Help => Topic started by: alexmmusic on August 27, 2022, 04:31:31 pm

Title: Can't use gtkmm with Code::Blocks
Post by: alexmmusic 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
Title: Re: Can't use gtkmm with Code::Blocks
Post by: Miguel Gimenez on August 27, 2022, 05:09:52 pm
Are you using Flatpak?
Title: Re: Can't use gtkmm with Code::Blocks
Post by: alexmmusic on August 27, 2022, 05:13:02 pm
I think I'm not
Title: Re: Can't use gtkmm with Code::Blocks
Post by: Miguel Gimenez on August 27, 2022, 05:35:12 pm
How did you install Code::Blocks?
Title: Re: Can't use gtkmm with Code::Blocks
Post by: alexmmusic 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)
Title: Re: Can't use gtkmm with Code::Blocks
Post by: stahta01 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.