Forum > Other

[Linux] Library search path

(1/1)

matthijs:
Referring to this post, I got a question. As it iseems to be not solely a Lazarus or FPC problem, but more a general Linux issue, I'll place it here. :)
As I understand fpc.cfg is, with regard to the library search path, supplemental to the ld.so.conf. So when I've got all library paths in ld.so.conf I would not have to add anything to the relating section in fpc.cfg. However I noticed that if a library path containing necessary libs is not in fpc.cfg the libs are not found, even though the path is mentioned in ld.so.conf.
However the error when compiling, states that ld cannot find a library.

Is this a flaw in the FPC compiler or is somethins amiss with ld?
In the first case it looks like the settings in fpc.cfg overwrite the settings in ld.so.conf.

Anyone any thoughts on this?

smace:
matthijs,

I'm not sure about what you mean, but you may try:

   project/compiler options/unit search path
   "other unit files" -Fu
   if you use some .inc files fill in -Fi too

matthijs:
It is not that I run into problems. It is more something I cannot explain.
In ld.so.conf I include the path to a library needed by my project.
In fpc.cfg this path is not included.
The error message when compiling the project is ''/usr/bin/ld: cannot find -Isomebadlyneededlib"
So why do I get a message from ld, while I would expect a message from fpc. :)

Vincent Snijders:
Because fpc uses ld as linker.

I am mainly a windows user, but I though ld.so.conf is only used for loading libraries at run time, not while compiling / linking.

Navigation

[0] Message Index

Go to full version