User forums > Using Code::Blocks

Adding pkg_config to Code:Blocks linker

(1/3) > >>

JulyJim:
I have "openCV.pc" package build by pkg_config and understood that one can add "Other linker options" to linker , but not sure how.
Can anybody give a greenhorn a hand with exact syntax?
Help is much appreciated.

Jenna:
Just add the "pkg-config" line to the other linker (and probably compiler)-options, just as you do it on the command-line, but surround it with backticks ("`"), e.g.

--- Code: ---`pkg-config glib-2.0 --libs`
--- End code ---

JulyJim:
OK, I have added it to linker and did not see any progress messages indicating it was used.
In theory it should not be used in compiler - it is a liker job to get the libraries.
But I'll give it a shot.

Jenna:
Use the compiler section for compiler-flags and the linker section for linker-stuff.
And what I forgot to write: you might have to close C::B and reopen it, to make it work.

JulyJim:
In theory it should not be used in compiler - it is a liker job to get the libraries.

Navigation

[0] Message Index

[#] Next page

Go to full version