Author Topic: Help with CFlags  (Read 3996 times)

Republican31

  • Guest
Help with CFlags
« 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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: Help with CFlags
« Reply #1 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.
« Last Edit: December 27, 2014, 09:41:03 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Republican31

  • Guest
Re: Help with CFlags
« Reply #2 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.