Page 1 of 1

OldEnrypt - No overloaded version...

Posted: Sun May 07, 2017 5:46 pm
by PdProg
Hi there! So I am upgrading a 2006 app to Berlin. I'm dealing with unicode for the first time, so please forgive anything that should be obvious.
The compiler is stopping on madMapFile/CalcCryptPassword/OldEncrypt
[dcc32 Error] madMapFile.pas(305): E2250 There is no overloaded version of 'OldEncrypt' that can be called with these arguments

OldEncrypt seems to take two AnsiString types. but the call is passing result for both params, and result is defined as a string type.
OldEncrypt(result, result);
Is there a compiler directive I'm missing somewhere that tells MadExcept to use AnsiStrings for string types?

Thanks,
Pete

Re: OldEnrypt - No overloaded version...

Posted: Sun May 07, 2017 6:10 pm
by madshi
Hi Pete,

if you just let the installer do its work, and don't temper with the library paths etc, Delphi shouldn't even *try* to compile any of the madCollection units. Instead it should just use the precompiled DCUs. So you must have manually screwed up the paths somehow? Either now or in the past?

I'd suggest a full manual cleanup of your PC like this:

1) Uninstall madCollection.
2) Search harddisk and registry for mad*.* and remove everything that belongs to madCollection.
3) Start Delphi to make sure it starts fine with no trace of madCollection left, and no complaints, either.
4) Now your PC should be clean and you can finally reinstall madCollection.
5) If you don't manually modify the library paths this time, it should now compile fine.

Re: OldEnrypt - No overloaded version...

Posted: Sun May 07, 2017 10:37 pm
by PdProg
:D Yeah. I suppose... I've always included the source in the path of everything I use, and I always try to license source when possible. I've been using your amazing library for more years than I can count, and always built the source. If I can't figure this out, I'll reinstall and let it build with the binaries. But I'm definitely going to try first - so if you have any ideas, I'd appreciate it. (it will also help me learn so I'm ready for the next unicode issue I come up against.
Thanks!
Pete

Re: OldEnrypt - No overloaded version...

Posted: Sun May 07, 2017 10:50 pm
by PdProg
Oh yeah. And I have my own MadIWSupport.pas that needs mad.inc - so "source" is in my path.

Re: OldEnrypt - No overloaded version...

Posted: Mon May 08, 2017 7:30 am
by madshi
Of course you can also build with the source. It just can create situations like this, when there are different DCU files from different madCollection versions flying around in multiple directories on your PC. Probably Delphi found an old "madCrypt.dcu" in some folder and tries to use it with the latest madExcept.pas. Or the other way around.