UNIDAC components in custom component issue

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MikeMyhre
Posts: 4
Joined: Thu 16 Aug 2012 00:46

UNIDAC components in custom component issue

Post by MikeMyhre » Fri 12 Jul 2019 16:25

I am trying to use the UNIDAC components in a custom database component I have created as a foundation for my suite of products. These are long established components that I am adding UNIDAC to. When I compile, there are no errors. When I attempt to install the component, C++ builder gives an error:
Cannot load package WSDataSource. It contains unit 'sqliteconstsuni' which is also contained in package 'liteprovider60'.
This is the same for all providers I am using (SQLite, MySQL, ODBC, etc).
I understand the issue, just not what the fix is. These appear to be static libraries that are already used by other components and there should be a way to have my component, use the existing library instead of adding another instance of the same thing.
My component has a requires: unidac60.bpi that allows the link to work.
Can anyone point me in the right direction?

MikeMyhre
Posts: 4
Joined: Thu 16 Aug 2012 00:46

Re: UNIDAC components in custom component issue

Post by MikeMyhre » Fri 12 Jul 2019 18:38

I believe I found it.
I had #pragma link statements for the providers and that was forcing the include of the code resulting in redundant packages.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: UNIDAC components in custom component issue

Post by MaximG » Mon 15 Jul 2019 05:03

We are glad that you found a necessary solution. Please don't hesitate to contact us with questions concerning UniDAC usage.

Post Reply