User forums > Using Code::Blocks

Help with CFlags

(1/1)

Republican31:
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

stahta01:
Does both of these command work on the Linux command line?


--- Code: ---pkg-config gtkmm-2.4 --cflags

--- End code ---


--- Code: ---pkg-config gtkmm-2.4 --libs

--- End code ---


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`

--- End code ---

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`

--- End code ---

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.

Republican31:
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`
--- End code ---

and


--- Code: ---`pkg-config gtkmm-3.0 --libs`
--- End code ---

works for that.

Navigation

[0] Message Index

Go to full version