As far as I know, you can add this line to the fpc config file, then remove that file totally from your project. But then you have to reference it when you use it in one of the units in the project so that the compiler knows about it to compile it as well.
/etc/fpc.cfg
-Fu/path/to/project/where/myunit.pas/file/lives
On Thu, Feb 13, 2025 at 2:20?PM Amir via lazarus <
Show quoted text 19 lines
wrote:
Hi team,
Currently, in Lazarus, to include a path in my compiler search path,
I choose a file in that path and add the file to my project (Shift-F11).
This way I would update the search path but add an irrelevant/unused
file to my lpr file. Can we add a way to just add the path of the
current file to the project's search path, without adding the file itself.
Best,
Amir
--
_______________________________________________
lazarus mailing list
https://lists.lazarus-ide.org/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20250213/a9fedfb1/attachment.htm>