View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0038170||Lazarus||IDE||public||2020-12-05 08:12||2021-02-21 10:39|
|Summary||0038170: Wrong unit search path when using relative path for output binary|
|Description||When creating a new Lazarus project with Lazarus itself, a nice -FU is created:|
As standard practice, the above can also be used for the binary output -o:
Setting the binary output to a relative path works well except for the inclusion of other unit files -Fu !
The resulting FPC link*.res file is created inside the bin directory. It uses the command line as created by Lazarus. Lazarus adds the -Fu options as a relative path relative to the original lpi-file. Lazarus should add them relative to the binary output path, where all the linking happens.
If the project has an extra unit named unit2.pas inside a directory myextraunit, this directory is included as ".\myunit\". But this directory will never be found due to the fact that the linking happens inside the binary path "\bin\$(TargetCPU)-$(TargetOS)"
|Additional Information||The -Fu options are added inside ConvertSearchPathToCmdLine. The are included as-is. However, this inclusion should use the correct relative paths, or switch towards absolute paths, as is done with the binary output -o.|
|Tags||No tags attached.|
|Fixed in Revision|