Recent

Author Topic: [Linux] Library search path  (Read 8071 times)

matthijs

  • Hero Member
  • *****
  • Posts: 537
[Linux] Library search path
« on: January 12, 2005, 07:40:52 am »
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?
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

smace

  • New Member
  • *
  • Posts: 12
    • http://www.smace.com.br
[Linux] Library search path
« Reply #1 on: January 14, 2005, 11:23:16 pm »
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

  • Hero Member
  • *****
  • Posts: 537
[Linux] Library search path
« Reply #2 on: January 15, 2005, 12:10:28 pm »
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. :)
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
[Linux] Library search path
« Reply #3 on: January 15, 2005, 01:48:46 pm »
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.

 

TinyPortal © 2005-2018