On 2015-11-17 18:25, Serguei TARASSOV wrote:
On 17/11/2015 15:24, fpc-pascal-requ...@lists.freepascal.org wrote:
Hi all.
In my program I need to use the OpenSSL unit from fpc (packages/openssl)
AND I also need to use the lNET package.
However my problem is that lNET also include a file named openssl.pas,
although it seems to be never that the one included in packages it
does not have the
same methods included.
So wheneven I include OpenSSL as a unit in my program it ALWAYS refer to
the one in lNET, presumable because it is a package - how do I avoid
this and
instead use/refer to the fpc one?
Regards,
-Torsten.
As Michael wrote it is not possible without unit renaming because
there is no notion of package in compiler.
The proper solution is to compile lNET package as a library (static
library doesn't supported AFAIK but DLL is ok).
Then write a small wrapper to import some types, classes, and
functions and use DLL with shared memory.
If you're required a really large interface of this package and then
large wrapper to write, you should better decompose your application
to compile some part as DLL with lNET package only.
Thank you for your suggestion - but to be honest I think the easiest way
for me is going to be: Use Lazarus to rename the OpenSSL unit from lnet,
which hopefully renames all reference within the package itself.
Regards,
Torsten.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal