NppCalc for 64bit Notepad++
I would like to recompile NppCalc 32 bit plugin to 64 bit so I can use it in Notepad++ 64 bit.
The source code downloaded from here https://sourceforge.net/projects/nppcalc/ seems to be Delphi.
I have installed Lazarus Delphi compiler , loaded the project and compiled it. It produced some .exe and is not usable. It is supposed to generate a dll. How to compile this Delphi code in 64 bit ?
Michael Vincent last edited by
@michael-vincent thanks. but it is not userfriendly like nppcalc and many functions are missing too.
I’m sorry to say it’s practically hopeless.
First, the developer used Delphi 7, which is Windows XP-era. I’m not sure they even had to think about 64-bits in those days. Notepad++ wasn’t Unicode back then, and Delphi has since made UTF-16 the default encoding for the
stringtype, so every
stringvariable has to be checked for buffer overflows, or else retyped as
AnsiString(which the developer took for granted).
Porting to Free Pascal (via Lazarus) is even harder. Not only are several standard libraries missing, but the plugin makes heavy use of inter-process communication with the Indy framework. For years this was a Delphi-only library. A Free Pascal port is still a work in progress.
Even supposing you could compile the library in a modern IDE, you have to update the Scintilla interface unit, or the 64-bit DLL will crash in current Notepad++ versions.
Maybe you could try getting your hands on Delphi 7, if you trust downloads from the Internet Archive.
@rdipardo Thank you for the detailed analysis. I have no experience in Delphi , I will continue to use 32bit NPP till a better calc plugin is available of 64bit NPP.