Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Republican31 on December 27, 2014, 08:37:53 pm

Title: Help with CFlags
Post by: Republican31 on December 27, 2014, 08:37:53 pm
Hi,

I am trying to implement the solution here http://stackoverflow.com/questions/6714307/gtkmm-compiling-error in Codeblocks 13.12 on Ubuntu 14.04 64-bit. I don't understand how to do this, and I've spent several hours searching and trying several things, but nothing ever ended up working. Can anyone help me?

Thank you,
Matt
Title: Re: Help with CFlags
Post by: stahta01 on December 27, 2014, 09:31:23 pm
Does both of these command work on the Linux command line?

Code
pkg-config gtkmm-2.4 --cflags

Code
pkg-config gtkmm-2.4 --libs


If yes, try adding the one with "--cflags" to the CB Project in Compiler "Other options"
Project -> Build Options
Select correct target from left hand list
Tab: Compiler Settings
Sub-Tab: "Other Options"
Enter the below line; NOTE must use the backtick `
Code
`pkg-config gtkmm-2.4 --cflags`

If yes, try adding the one with "--libs" to the CB Project in "Other Linker Options"
Project -> Build Options
Select correct target from left hand list
Tab: Linker settings
Box: "Other linker options"

Enter the below line; NOTE must use the backtick `
Code
`pkg-config gtkmm-2.4 --libs`

NOTE: You likely need to save the CB project and reopen the project for this change to take effect.
You might need to exit CB and restart for it to take effect


Tim S.
Title: Re: Help with CFlags
Post by: Republican31 on May 24, 2015, 04:16:04 am
Hi,

I am extremely sorry for not responding to this ever. I just want to say that your solution works perfectly! I did forget to mention however that I was using GTK 3.0, so

Code
`pkg-config gtkmm-3.0 --cflags`

and

Code
`pkg-config gtkmm-3.0 --libs`

works for that.