CB2007
I'm creating package from set of third-party pas-files. Linker asks for
DBCONNED.OBJ. DBCONNED resides in DclDbx.dcp and DclDbx.dcp already
presents in section 'Use these packages when compiling' of Delphi
compiler, but linker doesn't see it.
How to link DBCONNED.OBJ ?
--
Alex
.dcu's and .dcp's are only relevant to C++ packages
for Pascal files at dcc32 compile time. At link time you
need C++ things, i.e. obj's, .lib's, .bpi's so you
should add dcldbx to your "Requires" items. That package
is a design-only package, BTW, so is your package also
design-only? (there are issues with adding design-only
code to non design-only packages).
--Craig
Craig Farrell wrote:
> > CB2007
> > I'm creating package from set of third-party pas-files. Linker asks
> > for DBCONNED.OBJ. DBCONNED resides in DclDbx.dcp and DclDbx.dcp
> > already presents in section 'Use these packages when compiling' of
> > Delphi compiler, but linker doesn't see it.
> > How to link DBCONNED.OBJ ?
> .dcu's and .dcp's are only relevant to C++ packages
> for Pascal files at dcc32 compile time.
As you can see I added this file into "Delphi part" of project.
> At link time you need C++ things, i.e. obj's, .lib's, .bpi's
I know.
> so you should add dcldbx to your "Requires" items.
But Requires->Add Reference->Browse dialog->Package File name dialog
accepts only bpi files (message: "DclDbx.dcp cannot be added to
Requires list of this package" ). DclDbx.dcp is the only file with
DBCONNED inside, and this file has no corresponding C++ item (lib, bpi).
> That package
> is a design-only package, BTW, so is your package also
> design-only? (there are issues with adding design-only
> code to non design-only packages).
I very rarly deal with packages. As I understand this package should be
design-only. I can't find 'design-only' option in project options.
CB2006 'Progect Options' dialog had 'Package options' section for
linker, CB2007 has no such section.
I've added command line key $DesignOnly for Delphi and -Gpd in
'Additional options' for linker, but it doesn't help.
Your suggestions?
--
Alex
>>.dcu's and .dcp's are only relevant to C++ packages
>>for Pascal files at dcc32 compile time.
> As you can see I added this file into "Delphi part" of project.
That part is correct.
>>At link time you need C++ things, i.e. obj's, .lib's, .bpi's
> I know.
>>so you should add dcldbx to your "Requires" items.
> But Requires->Add Reference->Browse dialog->Package File name dialog
> accepts only bpi files (message: "DclDbx.dcp cannot be added to
> Requires list of this package" ). DclDbx.dcp is the only file with
> DBCONNED inside, and this file has no corresponding C++ item (lib, bpi).
Sorry, I did not notice that there is no dcldbx.bpi
and I think that it is a bug that it is not there.
The presence of dcldbx.dcp (for Delphi) indicates
the the same functionality should be available for
C++ projects (a fucntionality which is only accessed
via a dbconned.obj or dcldbx.bpi or dcldbx.lib).
> Your suggestions?
Is the component/package something that
can be downloaded? e.g. can I download
an eval version?
Does the pascal source really use DBCONNED?
I searched for dbconned.pas all the way back to
Dellphi 6 and it never existed. This is, I think
a dbExpress DB connection editor. Does the component
really use that at design time? Try removing dbconned
from the 'uses' list and see if it compiles.
--Craig
> > DclDbx.dcp ... has no corresponding C++ item (lib, bpi).
>
> I did not notice that there is no dcldbx.bpi
> and I think that it is a bug that it is not there.
> The presence of dcldbx.dcp (for Delphi) indicates
> the the same functionality should be available for
> C++ projects (a fucntionality which is only accessed
> via a dbconned.obj or dcldbx.bpi or dcldbx.lib).
Do you regard this as problem for QC in CB2007 distribution?
Does it possible to create and compile with dcc 'intermediate' package
which exports required item(s) for bcb ?
> Is the component/package something that
> can be downloaded? e.g. can I download
> an eval version?
Yes, http://www.ehlib.com/downloads.htm
Evaluation version has no source, I have no idea is this enough for
investigation; I have complete source.
> Does the pascal source really use DBCONNED?
Yes, definitely.
> I searched for dbconned.pas all the way back to
> Dellphi 6 and it never existed.
I think it always had only binary version without source for users.
> Try removing dbconned from the 'uses' list and see if it compiles.
DBCONNED contains EditConnection (analog of EditConnectionString for
ADO as I understand). Yes, it probably will help but I'm trying to find
a "full solution".
--
Alex
> Do you regard this as problem for QC in CB2007 distribution?
Yes, the missing .bpi is a bug.
> Does it possible to create and compile with dcc 'intermediate' package
> which exports required item(s) for bcb ?
Sort of, I will post steps at the end of this message.
> Evaluation version has no source, I have no idea is this enough for
> investigation; I have complete source.
Thanks, they had some sample components with source that
gave me some ideas about their design.
> I think it always had only binary version without source for users.
Yes, that seems correct.
> a "full solution".
It is possible, with CB2007, to use dcc32.exe to build
a delphi design package. This can then be installed
into the IDE. Also, dcc32.exe has a -JL switch to generate
C++ headers, lib, and bpi. This means that if the
component designers have correctly kept design code
in the design package and not the run package, then
the component can be used in C++ applications because
applications only need the run package. Only the IDE
needs the design package.
The following shows 3 files and the steps necessary
to get both the needed files for the IDE (design) and
C++ apps that use the component (runtime).
rem this is the .bat file
dcc32 -JL RunPackTest.dpk
dcc32 -LUDesignIDE;RunPackTest DesPackTest.dpk
copy comp1.hpp "c:\Program Files\CodeGear\RAD Studio\5.0\include"
copy RunPackTest.bpi "c:\documents and settings\<user>\my documents\rad
studio\5.0\dcp"
copy RunPackTest.lib "c:\documents and settings\<user>\my documents\rad
studio\5.0\dcp"
copy DesPackTest100.bpl "c:\documents and settings\<user>\my
documents\rad studio\5.0\bpl"
copy RunPackTest100.bpl "c:\documents and settings\<user>\my
documents\rad studio\5.0\bpl"
//this is the file DesPackTest.dpk
package DesPackTest;
{$LIBSUFFIX '100'}
{$DESIGNONLY}
{$IMPLICITBUILD OFF}
requires
rtl,
vcl,
designide,
xmlrtl,
vclactnband,
vclx,
RunPackTest,
dcldbx;
contains
comp_editor in 'comp_editor.pas';
end.
//this is the file RunPackTest.dpk
package RunPackTest;
{$LIBSUFFIX '100'}
{$RUNONLY}
{$IMPLICITBUILD OFF}
requires
rtl,
vcl;
contains
comp1 in 'comp1.pas';
end.
> the missing .bpi is a bug.
Ok, QC #50269.
> > Does it possible to create and compile with dcc 'intermediate'
> > package which exports required item(s) for bcb ?
>
> I will post steps at the end of this message.
Many thanks !!
I'll try it within the next few days.
--
Alex
> It is possible, with CB2007, to use dcc32.exe to build
> a delphi design package.
I've simply compiled original DPKs according to your instructions
dcc32 -U"<BCB11>\Lib" -JL RunT.dpk
dcc32 -U"<BCB11>\Lib" DesT.dpk
and have installed components.
Thank you again !
--
Alex