Results 1 to 2 of 2

Thread: Is there a search path in the enviroment settings?

  1. #1

    Is there a search path in the enviroment settings?

    Hey Guys

    Delphi has three ways to find files:

    > It looks in the same directory as the unit that is using the file
    > It looks in the project's search path
    > It looks in the enviroment search path

    I guess the first two things work the same in Lazarus, but how about the third?
    I can't seem to find any search-path setting that is global for all projects. Does Lazarus have this?

    Thanks
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  2. #2
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    287

    Re: Is there a search path in the enviroment settings?

    You can edit the fpc.cfg file located in your fpc installation directory, and put any global search paths using -FuPATH (for units)and -FiPATH for include files. You can also put an asterisk * at the end of the path to make fpc look into all subdirectories of that path. I think that is the only 'global' way.

    There are some issues with this approach though, identifier completion does not work as it should as Lazarus can not check the directories specified in the fpc.cfg file. Also when debugging Lazarus may ask you to find the required sources.

    Note that you can save Lazarus compiler options to a file. You can make a template project, list all the paths of units in the options and save this to a file, and then load it for each project you need.
    Existence is pain

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •