[fpc-pascal] Code tools search paths
I found out that setting TCodeToolsOptions.FPCOptions (-Fu and -Fi) was doing something because it helped FindDeclaration to search for units not in the same same directory as the main program. However now I've encountered problems with FindReferences (the example Mattias made for me) which seem to be caused by the inclusion of FPCOptions (if I remove the FPC options it properly builds the unit search graph). reading on https://wiki.lazarus.freepascal.org/Codetools it sounds like I need to be using TDefineTemplate to add unit search paths. Which is the correct way to do this? Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Code tools search paths
On Sun, 10 May 2020 16:34:11 +0700 Ryan Joseph via fpc-pascal wrote: > I found out that setting TCodeToolsOptions.FPCOptions (-Fu and -Fi) > was doing something because it helped FindDeclaration to search for > units not in the same same directory as the main program. However now > I've encountered problems with FindReferences (the example Mattias > made for me) which seem to be caused by the inclusion of FPCOptions > (if I remove the FPC options it properly builds the unit search > graph). > > reading on https://wiki.lazarus.freepascal.org/Codetools it sounds > like I need to be using TDefineTemplate to add unit search paths. > Which is the correct way to do this? TDefineTemplates. see for example lazarus/components/codetools/examples/setincludepath.pas Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Code tools search paths
> On May 10, 2020, at 4:47 PM, Mattias Gaertner via fpc-pascal > wrote: > > TDefineTemplates. > see for example > lazarus/components/codetools/examples/setincludepath.pas > Ok, I'll move to this. What are the FPC options for then? I thought I could do things like -Fu and -d with it. Are include paths and unit paths the same? I just see TDefineTemplate which seems to do both. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Compiler mode for code in rtl and rtl-extra
I've been beavering away at a fix for https://bugs.freepascal.org/view.php?id=37013 and I've run into something unexpected. When I try to build rtl-extra with my proposed patch applied, I get compiler errors for things like the use of result variables and var/out variables. I'm so used to these being available that I quite forgot there are modes where they're not. My question is, first, what mode is the compiler using, and second, is this required for portability to other platforms? Or am I completely misunderstanding this? Example error messages: sockets.inc(497,5) Error: Identifier not found "Result" sockets.inc(510,53) Fatal: Syntax error, ":" expected but "identifier RES" found for this definition: function convert_hextet(const s: ShortString; out res: Word): Boolean; It's not a big deal to rewrite around these, but first I want to make sure I am correctly diagnosing the issue. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal