Ahoy everyone,
i'm currently having a "little" problem, regarding the process of adding a 3rd party library to my project (openssl, if that's relevant):
In "Project options"->"Libraries"->"Libraries used in project" i added "openssl (pkg-config)", but for some reason Code::Blocks seems to totally ignore this.
Normally there should be "-lssl -lcrypto" in the linker's command, but it's not there...
So the question is: Am i missing something, or is this a bug/error/foo?
P.S.: In case it's relevant: I'm using Code::Blocks version 13.12 rev 9501 on Ubuntu 16.04.2 LTS.
13.12 is really old, but that should not matter in this case.
What exactly do you add ?
It should be something like:
`pkg-config foo --cflags`
or
`pkg-config foo --libs`
or in other words, the exact "pkg-config"-command in backticks.
In "Compiler settings -> Other compiler options" for the compiler-stuff and in "Linker settings -> Other linker options" for the linktime related command.
Either on target or on project-level of the build options.
Okay, adding the pkg-config stuff works. :)
But then, what exactly is the purpose of the "Project options"->"Libraries"->"Libraries used in project" list? ???
This one:
(https://lh3.googleusercontent.com/uLoyV2u1JvlDzfW_q601K2YzdV8JytJibq5DSMa6aNnN4z0YY8F2pEvXX6XeZ0adlI1Jc3NJLBC7myM=w1600-h646)
P.S.: It doesn't make any difference, whether openssl is listed there or not...
Depends on what you add there.
If you just need "-lssl" and "-lcrypto" as linker-command, you should add "ssl" and "crypto" there.
That's in the "Build options"...
The "thing" i was asking about is in the window you get, when you "right-click" the project, select "Properties...", on the tab labelled "Libraries"...
P.S.: It definitly IS working by adding the pkg-config commands in the "Build options", but i still don't understand, what the purpose of the "Libraries used in project" list is, since it seems to have no effect at all...
Quote from: isendrak on April 22, 2017, 05:49:43 PM
That's in the "Build options"...
The "thing" i was asking about is in the window you get, when you "right-click" the project, select "Properties...", on the tab labelled "Libraries"...
P.S.: It definitly IS working by adding the pkg-config commands in the "Build options", but i still don't understand, what the purpose of the "Libraries used in project" list is, since it seems to have no effect at all...
Now I understand.
I never use it.
Did you uncheck the "Don't set up automatically" ?
If I do this it works as expected on my system.
By the way:
the "Libraries"-tab in the properties belongs to the "lib-finder"-plugin.
QuoteDid you uncheck the "Don't set up automatically" ?
Now i did, now it works... Dunno, what exactly "Don't set up automatically" means in this context though... :o
Quotethe "Libraries"-tab in the properties belongs to the "lib-finder"-plugin.
This, i excepted somewhat... The "lib-finder" plugin was mentioned in the dialog you get, when clicking on "Try to detect missing ones"... ;D
P.S.: YAY! It worketh, me thanketh thee for thine help and wisheth thee a good night/day (depending on thine zone o' time...)
P.P.S.: How exactly doth one mark a topic o' oneself as solved here?