ld.exe:link.res: file format not recognized; treating as linker script
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
I am not sure that this error report is a bug or a feature.
Nor am I certain that this is the correct place to report it because it occurred while using Lazarus (version#: 0.9.6 beta).
I will also place this error in the Lazarus Bug reporting system.
This error occurred under Win2000.
It is caused by an incompatibility between the linker and the windows file naming convention.
The error will occur when then any project is placed inside the the directory F:\Lazarus(Work)...
If the main directory is renamed to F:\Work... then the error disappears and the project is built correctly.
I am sure that the bracket characters "(" & ")" have special meaning to the linker ld.exe. If they occur as part of a file name to be linked, the syntax check raises an error.
As I see it the problem can be solved in one of two ways.
-
Users must be warned in the documentation that the use of special characters will cause the linker to fail :-;
(see the bug reports 1600, 1718, 2448, 2938) -
Alternatively a more sophisticated solution would add a syntax check of all the file names used. This would have to be one of the earliest passes within the compilation phase. This syntax check could also be used to uncover other potential failures caused by incompatible naming of a component file.
Of course solution two would require greater programming effort.
Additional information:
Reporter: ECrookes
EMail: ecrookes at nexgo dot de
Mantis conversion info:
- Mantis ID: 5949
- OS: Win32
- Version: ?