[fpc-pascal] Please someone explain this to me

Sven Barth pascaldragon at googlemail.com
Wed Feb 10 15:09:26 CET 2016


Am 10.02.2016 14:09 schrieb "Juha Manninen" <juha.manninen62 at gmail.com>:
>
> On Wed, Feb 10, 2016 at 2:01 AM, Vojtěch Čihák <vojtech.cihak at atlas.cz>
wrote:
> > There exists IDE directive
> >
> > {%MainUnit ***.pas}
> >
> > and include files should contain it.
>
> Yes, that is the solution for Anthony's problem. Most include files
> used by LCL units have it but FPC libraries may not.
> When the directive is set, Lazarus IDE always knows how to jump
> between interface in Pascal unit and implementation in an include
> file.
> The {%...} directive is a comment in other contexts and can be used
safely.

What about include files included by other include files?

> > But I don't know if there are more units containing the same include
file.
>
> When a big Pascal unit is split into include files then an include
> file is referred from one place only.
> The directive is not meant for generic include files.
>
> The original question about dynlibs remains. I understood with FPC 3.0
> it is not needed but I could not compile without it.
> This has nothing to do with cross-platform code. I am testing with
> Xubuntu + GTK2 as the code is part of LCL-GTK2.
> Actually I still have the RC1 version here:
>  $ fpc
>  Free Pascal Compiler version 3.0.0rc1 [2015/08/07] for x86_64
>  ...
> Could there be such a difference between RC1 and the release?
> Anyway, I added dynlibs there. It is needed at least by FPC 2.6.4
> which we still support for some time.
> Ubuntu people, please test the Unity TTrayIcon feature. I have only
> tested it does not break LCL-GTK2 in other systems. I will install
> Ubuntu + Unity soon.

I must check whether I had done that change before or after the branch...
On non-Windows systems you'll need to include dynlibs at least in the main
project anyway as it is needed to initialize the library manager (just like
cthreads and cwstring).

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160210/1a8ac8ea/attachment.html>


More information about the fpc-pascal mailing list