Reputation: 2239
When I use pkg-config --libs , the output contains many references to libraries. However, some of these libs do NOT have the "-l" in front of them so the linker does not know what to do with the name. For example, I will get the output: stdc++ instead of -lstdc++
What would cause pkg-config to do this?
Also, where does pkg-config get its information? The man page says it uses .ps files in the "prefix" directory. But where are these prefix directories?
-Andres
Upvotes: 1
Views: 192
Reputation: 22308
The $PKG_CONFIG_PATH
can be set for additional paths to search for *.pc
files. You can query the default paths with:
pkg-config --variable pc_path pkg-config
The --libs
output is determined by the Libs:
line in the .pc
file; usually with something like:
Libs: -L${libdir} -lfoo
Perhaps the .pc
file you are referencing is not correctly constructed?
Upvotes: 1