Closed Joao-Peterson closed 2 years ago
Hello @Joao-Peterson , I deeply apologize as I am just seeing this issue you raised here.
the problem you are encountering is happening at
engine.Create();
you are meant to initialize it this way instead
engine := TAesEngine.Create();
apologies once again.
Oh my god, sorry about that friend, this is embarrassing. Thanks.
Description Hi, after struggling a little to build the crypto, hash and simplebase libraries i tried to code some AES encryption to see if it works as expected, but while trying i got stuck, the application compiles successfully but an error is raised when i try to execute the first library call, TAesEngine.Create(), that leads me to believe i'm either not compiling my application correctly on Rad studio, some settings might be wrong, or the compiled library has a problem.
To Reproduce Compiled the libraries on Rad Studio 10.4, computer is running Windows 10. Compiled SimpleBaseLib4Pascal, HashLib4Pascal and CryptoLib4Pascal for release, win64 configuration.
Output paths:
C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\Win64
C:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp\Win64
The Bpl\ path is on the system Path env var.
The Dcp's are included on the project via the
Project>Options>Runtime Packages
menu under All configurations, Link with Runtime Packages istrue
, Runtime packages contains the packages names. On the little folder icon we can see a dialogue with the option Search path, it also contains both the Dcp and Bpl output paths.Auto completion can see the symbols on the IDE editor, compiling works nicely, then i make the call:
Crypto.pas:
Behavior When i make the call to
engine.Create()
, first line of the functionen()
, the programs raises a dialogue of access violation that reads:Call stack when trying to call
engine.Create()
:Additional context All this is happening on a single form VCL application.
I tried copying the bpl files for the libs side by side with the application executable but it didn't work either.
I'm pretty sure that i missed something while compiling the Libs and or missing something on the application compile/linking as well, and that all this is a miss linked runtime package kinda deal.
Thanks for reading and sorry if i this might be a newbie and/or unrelated question. Best regards.