I tried notepad++,it works for a very simple source just with unit sysutils,generics.collections.But if I tried to use lconvEncoding,the compiler just complaints:
As I already wrote and explained
here in your other thread ...
The RTL and FCL are part of the FPC command-line compiler and as such are configured correctly (or at least should be). Lazarus and its LCL is an entirely different thing and that is the whole reason the Lazarus IDE and its package system exists in the first place.
If you explicitly want to make use of Lazarus specific units using only the FPC command-line compiler then you are required to configure FPC accordingly.
So, edit your fpc.cfg file and add the line:
-Fu<path/to/your/lazarus/installation>/components/lazutils/lib/$fpctarget
Where <path/to/your/lazarus/installation> needs to be replaced to match your own setup.
This needs to be done for every (individual) LCL package that you wish to make use of but, keep in mind that Lazarus uses several locations to "store" its units so the post-fixed part of the path also differs depending on which unit/package your Free Pascal source wants to make use of.
The example as shown is only to fix the missing lconvEncoding unit message/
As I also wrote in that message, if you are writing GUI applications using the LCL then simply don't do it this way as it isn't worth the time (you'll figure that out eventually when code is starting to make use of of 3th party packages/components).
In Lazarus ,I just did one more thing: project inspector -> Required Package, searched and added LCL.Everything goes fine.
Yes, because Lazarus takes all that burden away from the user. All package specific settings are part of that package, and that includes the required unit paths. So in Lazarus adding a dependency is enough to make things work as intended.