Error installing nondll Package for Delphi 7

Discussion forum for PivotCube VCL users. Common questions. Bug and problem reports

Moderator: Alex Zencovich

Error installing nondll Package for Delphi 7

Postby kbc » Tue Sep 19, 2006 10:54 pm

I downloaded the latest version from my registered link (full source) today and I get the following when compiling the Delphi7 pivotcube.dpk: Anyone else had trouble?
Build
[Warning] Cube.pas(1457): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(1563): Incompatible types: 'IStream' and 'TStreamAdapter'
[Error] Cube.pas(1724): Undeclared identifier: 'Write'
[Warning] Cube.pas(1724): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(1730): Undeclared identifier: 'Write'
[Warning] Cube.pas(1730): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(1736): Undeclared identifier: 'Write'
[Warning] Cube.pas(1736): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(1749): Undeclared identifier: 'Write'
[Warning] Cube.pas(1749): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(1790): Undeclared identifier: 'Write'
[Warning] Cube.pas(1790): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(1793): Incompatible types: 'MSXML2_TLB.IStream' and 'ActiveX.IStream'
[Error] Cube.pas(1796): Incompatible types: 'MSXML2_TLB.IStream' and 'ActiveX.IStream'
[Error] Cube.pas(1930): Undeclared identifier: 'Read'
[Warning] Cube.pas(1930): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(1938): Undeclared identifier: 'Read'
[Warning] Cube.pas(1938): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(1946): Undeclared identifier: 'Read'
[Warning] Cube.pas(1946): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(1968): Undeclared identifier: 'Read'
[Warning] Cube.pas(1968): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(2143): Undeclared identifier: 'Read'
[Warning] Cube.pas(2143): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(2147): Incompatible types: 'MSXML2_TLB.IStream' and 'ActiveX.IStream'
[Error] Cube.pas(2151): Incompatible types: 'MSXML2_TLB.IStream' and 'ActiveX.IStream'
[Error] Cube.pas(9065): Undeclared identifier: 'Write'
[Warning] Cube.pas(9065): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(9069): Incompatible types: 'MSXML2_TLB.IStream' and 'ActiveX.IStream'
[Error] Cube.pas(9073): Incompatible types: 'MSXML2_TLB.IStream' and 'ActiveX.IStream'
[Error] Cube.pas(9458): Undeclared identifier: 'Read'
[Warning] Cube.pas(9458): Comparing signed and unsigned types - widened both operands
[Error] Cube.pas(9461): Incompatible types: 'MSXML2_TLB.IStream' and 'ActiveX.IStream'
[Error] Cube.pas(9464): Incompatible types: 'MSXML2_TLB.IStream' and 'ActiveX.IStream'
[Fatal Error] BinaryCube.pas(153): Could not compile used unit 'Cube'
kbc
Guest
 
Posts: 3
Joined: Tue Sep 19, 2006 10:41 pm
Location: Roanoke, VA USA

Postby AlexZencovich » Wed Sep 20, 2006 5:22 am

Seems like you have problem with IStream decalartion. By default ISTream declared in unit ActiveX and NOT defined in MSXML2_TLB.pas.
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am

Postby kbc » Wed Sep 20, 2006 2:01 pm

AlexZencovich wrote:Seems like you have problem with IStream decalartion. By default ISTream declared in unit ActiveX and NOT defined in MSXML2_TLB.pas.


Alex,

I have found that the IStream is declared in BOTH ActiveX and in MSXML2_TLB.pas.

ActiveX.pas:

Code: Select all
  IStream = interface(ISequentialStream)
    ['{0000000C-0000-0000-C000-000000000046}']
    function Seek(dlibMove: Largeint; dwOrigin: Longint;
      out libNewPosition: Largeint): HResult; stdcall;
    function SetSize(libNewSize: Largeint): HResult; stdcall;
    function CopyTo(stm: IStream; cb: Largeint; out cbRead: Largeint;
      out cbWritten: Largeint): HResult; stdcall;
    function Commit(grfCommitFlags: Longint): HResult; stdcall;
    function Revert: HResult; stdcall;
    function LockRegion(libOffset: Largeint; cb: Largeint;
      dwLockType: Longint): HResult; stdcall;
    function UnlockRegion(libOffset: Largeint; cb: Largeint;
      dwLockType: Longint): HResult; stdcall;
    function Stat(out statstg: TStatStg; grfStatFlag: Longint): HResult;
      stdcall;
    function Clone(out stm: IStream): HResult; stdcall;
  end;


MSXML2_TLB.pas

Code: Select all
  IStream = interface(ISequentialStream)
    ['{0000000C-0000-0000-C000-000000000046}']
    function RemoteSeek(dlibMove: _LARGE_INTEGER; dwOrigin: LongWord;
                        out plibNewPosition: _ULARGE_INTEGER): HResult; stdcall;
    function SetSize(libNewSize: _ULARGE_INTEGER): HResult; stdcall;
    function RemoteCopyTo(const pstm: IStream; cb: _ULARGE_INTEGER; out pcbRead: _ULARGE_INTEGER;
                          out pcbWritten: _ULARGE_INTEGER): HResult; stdcall;
    function Commit(grfCommitFlags: LongWord): HResult; stdcall;
    function Revert: HResult; stdcall;
    function LockRegion(libOffset: _ULARGE_INTEGER; cb: _ULARGE_INTEGER; dwLockType: LongWord): HResult; stdcall;
    function UnlockRegion(libOffset: _ULARGE_INTEGER; cb: _ULARGE_INTEGER; dwLockType: LongWord): HResult; stdcall;
    function Stat(out pstatstg: tagSTATSTG; grfStatFlag: LongWord): HResult; stdcall;
    function clone(out ppstm: IStream): HResult; stdcall;
  end;


As you can see the interface declarations are different.

The uses clause in the cube.pas looks like this:
Code: Select all
uses
  ComObj, Windows, zCube_TLB,  Classes,SysUtils, {$IFNDEF DELPHI5} DateUtils, Variants, {$ENDIF}Dimension_SRC,
  Measure_SRC,BinaryCube, registry, StdVcl, ActiveX, Math,
  MeasureCache, Cell_SRC,  msxml2_tlb,zLib;


I did a test app where I did the following:
Code: Select all
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ActiveX, msxml2_tlb;

.
.
.

procedure TForm1.Button1Click(Sender: TObject);
var
  StreamIntf : IStream;
  TestStream :  TStream;
begin
  StreamIntf := TStreamAdapter.Create(TestStream);
end;


When I have the uses clause as above I get the same error, but if I change the uses clause so ActiveX shows up AFTER the msxml2_tlb I get no errors.

To continue this I went to the cube.pas where the error was being thrown while building the package and I swapped the position of ActiveX an the MSXML2_TLB and it now builds. I then compiled and clicked the install button on the package and it said the pivotcube.bpl has been installed, but it shows many more components being registered than I recall. Most are called MSXML2_TLB.????

Very strange... thoughts?
kbc
Guest
 
Posts: 3
Joined: Tue Sep 19, 2006 10:41 pm
Location: Roanoke, VA USA

Postby kbc » Wed Sep 20, 2006 2:32 pm

I found the problem. Looks like there was another msxml2_tlb.pas in the Delphi import folder which was first in the search list. I have no clue where that came from or what installed it. I renamed them and uninstalled the PivotCube and reinstalled and all is well now... at least getting it installed.

Thanks
kbc
Guest
 
Posts: 3
Joined: Tue Sep 19, 2006 10:41 pm
Location: Roanoke, VA USA

Postby AlexZencovich » Wed Sep 20, 2006 4:01 pm

It is usual problem on pity. Delphi IDE often installs imported units (in IMPORTS folder) without any notice to developer.
Same may happened with zCube.dll (zCube_TLB.pas will generated and installed in \Imports) and it will produce version incompatibility error
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am


Return to PivotCube VCL

Who is online

Users browsing this forum: No registered users and 13 guests

cron