Find declaration points to an identifier different than what the compiler thinks
Original Reporter info from Mantis: Stephano
-
Reporter name:
Original Reporter info from Mantis: Stephano
- Reporter name:
Description:
Open the attached project. Compiling it yields:
unit1.pas(35,40) Error: Call by var for arg no. 1 has to match exactly: Got "TRTLCriticalSection" expected "LongWord"
winapi.inc(238,11) Hint: Found declaration: EnterCriticalSection(var LongWord);
However, find declaration locates EnterCriticalSection(var cs : TRTLCriticalSection) in threadh.inc.
Furthermore, double clicking on the winapi.inc line in the messages window:
'Unable to find file "winapi.inc".
If it belongs to your project, check search path in
Project -> Compiler Options -> Search Paths -> Other Unit Files. If this file belongs to a package, check the appropriate package compiler options. If this file belongs to Lazarus, make sure compiling clean. If the file belongs to FPC then check fpc.cfg. If unsure, check Project -> CompilerOptions -> Test'
Removing LCLIntf from the uses clause causes compilation to succeed, in agreement with CodeTools.
Mantis conversion info:
- Mantis ID: 25187
- OS: Ubuntu
- OS Build: 11.04
- Platform: i386
- Version: 1.3 (SVN)
- Fixed in revision: 44235 (#c70cdd17)