[Lazarus] sockets.pp(20, 5) Error: include file not found "osdefs.inc"

Michael Van Canneyt michael at freepascal.org
Sun Mar 22 11:01:19 CET 2015

On Sun, 22 Mar 2015, FreeMan wrote:

> On 21.03.2015 13:22, Michael Van Canneyt wrote:
>> Unfortunately, I made a mistake when I first checked the issue.
>> The problem is not in FPC, but seems to be a configuration problem on your 
>> PC.
>> Michael. 
> For test, Install from ccr, lnet v0.6.6 components.
> lnetvisual.lpk --> paths are empty, just outputs set
>  lnetvisual.lpk 's required packages is lnetbase.lpk --> -Fu=../lib 
> -Fi=../lib/sys other sources = ../lib;../lib/sys
>  lnetbase.lpk 's required packages is empty.
> open new project.
> Put TLTCPComponent and tbutton on form. on Button1Click, type 
> "LTCPComponent1." and after dot, press ctrl + space and get this error
> sockets.pp(20,5) Error: include file not found "osdefs.inc"
> not close IDE and not make or not rebuild, jus copy
> /opt/freepascal/3.1.1/packages/rtl-extra/src/linux/osdefs.inc  to 
> /opt/freepascal/3.1.1/packages/rtl-extra/src/unix/ folder
> then press ctrl + space code complied is work !! no error
> What can be problem ? project compiling and working normal, just code 
> complied has error.

You may never copy files like that, you will end up with problems later on.

The problem you mention is indeed a lazarus code tools problem.
To my knowledge, it uses a heuristic to find include files. 
The heuristic used in the rtl should also be applied to the rtl-extra package.

But: I tried your report with the latest IDE, but the IDE does not complain,
so I assume the heuristic is doing it's work. Only Mattias can give more info.


More information about the Lazarus mailing list