On 2/9/2016 2:58 PM, Anthony Walter wrote:
I really don't like the include files with Lazarus and Free Pascal for
the following reason:
How the **** am I supposed to know which file is including an include
file?
Often times I am trying to find a function or class or some other
identifier and I search files on disk for the name. Then it turns out
the identifier is in some include file. Often the include file doesn't
have any information to which unit it belongs and I am then forced to
search further for other files which reference the include file. It's
a mess.
In this issue http://mantis.freepascal.org/view.php?id=29599 Juha is
asking how I was able to compile my patch without using the dynlibs
unit. Sure enough I am not using the dynlibs unit, but on my system it
compiles. When I control click the LoadLibrary identifier in my Unity
patch, Lazarus brings up an include file with LoadLibtary declared,
but I have no idea which unit is including it (remember I'm not using
unit dynlibs).
So my question is, how do the rest of you deal with include files and
locating the unit including them? And also can this system for
including files be better implemented, for example by some IDE feature
to figure this out for you and displaying the "owning" units.
It seems to me as if you are approaching the problem from the wrong end,
which has your search end up in the include file instead of the
associated unit.
I had only a cursory look at your problem and it seems you just went
straight to the Linux related LoadLibrary function instead of indeed
using the dynlibs unit, which exist for the purpose of creating a
cross-platform way of using dynamically loaded libraries (hence the
name). You seem to just ignore the fact that this is a highly OS
depended functionality and seemed to have taken interest only in the
Linux related part of what ever your initial problem is/was and used
that portion of the code in stead of making use of the dynlibs unit.
Ralf
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal