C++ Builder2010版本安装ActiveX
我想用2010版本安装ActiveX(MAPX),先新建一个Package,然后导入Active--MAPX,Build后Install,出现
Checking project dependencies...
Compiling Package1.cbproj (Debug configuration)
[BCC32 Error] MapXLib_OCX.h(697): E2316 'set_Width' is not a member of 'TField'
Full parser context
MapXLib_OCX.cpp(103): #include ..\7.0\Imports\MapXLib_OCX.h
MapXLib_OCX.h(53): namespace Mapxlib_tlb
MapXLib_OCX.h(665): class TField
[BCC32 Error] MapXLib_OCX.h(698): E2316 'set_Decimals' is not a member of 'TField'
Full parser context
MapXLib_OCX.cpp(103): #include ..\7.0\Imports\MapXLib_OCX.h
MapXLib_OCX.h(53): namespace Mapxlib_tlb
MapXLib_OCX.h(665): class TField
Failed
Elapsed time: 00:00:14.7
找了点资料,将
__property short Width={ read=get_Width, write=set_Width, stored=false };
__property short Decimals={ read=get_Decimals, write=set_Decimals, stored=false };
改为
__property short Width={ read=get_Width, stored=false };
__property short Decimals={ read=get_Decimals, stored=false };
然后出现错误:TLabel组件不能被Package.bpl注册,因为dclstd140.bpl已经注册了。
Error Details:
[50061F4E]{rtl140.bpl } Classes.TRegGroup.RegisterClass (Line 2286, "Classes.pas" + 4) + $22
[500624F0]{rtl140.bpl } Classes.TRegGroups.RegisterClass (Line 2554, "Classes.pas" + 2) + $6
[50062A04]{rtl140.bpl } Classes.RegisterClass (Line 2731, "Classes.pas" + 5) + $7
[2189747F]{delphicoreide140.bpl} PasCppPakMgr.TIDERegClass.Create (Line 795, "PasCppPakMgr.pas" + 8) + $3
[21896569]{delphicoreide140.bpl} PasCppPakMgr.RegisterComponents (Line 355, "PasCppPakMgr.pas" + 6) + $10
[50062ECD]{rtl140.bpl } Classes.RegisterComponents (Line 2860, "Classes.pas" + 2) + $0
[2189C213]{delphicoreide140.bpl} PasCppPakMgr.TIDEDesignPackage.Load (Line 2291, "PasCppPakMgr.pas" + 43) + $0
[2189BE1F]{delphicoreide140.bpl} PasCppPakMgr.TIDEDesignPackage.DelayLoad (Line 2177, "PasCppPakMgr.pas" + 11) + $4
[218A02A0]{delphicoreide140.bpl} PakList.TPackageListItem.LoadWait (Line 913, "PakList.pas" + 3) + $4
[218A0224]{delphicoreide140.bpl} PakList.TPackageListItem.LoadDesignPackage (Line 891, "PakList.pas" + 15) + $5
[2189F29F]{delphicoreide140.bpl} PakList.TPackageListItem.SetIsInstalled (Line 559, "PakList.pas" + 7) + $3
[2189F079]{delphicoreide140.bpl} PakList.TPackageList.AddPackage (Line 473, "PakList.pas" + 13) + $5
[22550CF3]{bcbide140.bpl} MSBProjOpts.TProjectOptions.InstallPackage (Line 1956, "MSBProjOpts.pas" + 7) + $5
[225C0AA4]{bcbide140.bpl} CppMgr.TCppPackageProjectUpdater.InstallPackage (Line 7055, "CppMgr.pas" + 18) + $2C
[218A2A47]{delphicoreide140.bpl} PkgContainers.TStdPackageProjectContainer.CommandHandler (Line 178, "PkgContainers.pas" + 8) + $5
[22581586]{bcbide140.bpl} CppContainers.TCPPPackageProjectContainer.CommandHandler (Line 907, "CppContainers.pas" + 9) + $8
[20708786]{coreide140.bpl} ContainerIntf.TIDEProjectManagerMenuObject.Execute (Line 848, "ContainerIntf.pas" + 21) + $17
[2070A36E]{coreide140.bpl} ContainerIntf.TProjectManagerMenuItem.Click (Line 1096, "ContainerIntf.pas" + 18) + $22
[502817FB]{vcl140.bpl } Menus.TMenu.DispatchCommand (Line 3383, "Menus.pas" + 5) + $2
[502829DA]{vcl140.bpl } Menus.TPopupList.WndProc (Line 4489, "Menus.pas" + 4) + $E
[11F2A121]{cxLibraryRS14.bpl} Cxcontainer.TcxCustomInnerListBox.CNDrawItem + $695
[50282929]{vcl140.bpl } Menus.TPopupList.MainWndProc (Line 4464, "Menus.pas" + 2) + $5
[50076408]{rtl140.bpl } Classes.StdWndProc (Line 13015, "Classes.pas" + 8) + $0
[502C9921]{vcl140.bpl } Forms.TApplication.StopHintTimer (Line 10491, "Forms.pas" + 3) + $6
[502C8775]{vcl140.bpl } Forms.TApplication.ProcessMessage (Line 9760, "Forms.pas" + 30) + $1
[502C87BA]{vcl140.bpl } Forms.TApplication.HandleMessage (Line 9790, "Forms.pas" + 1) + $4
[502C8AE5]{vcl140.bpl } Forms.TApplication.Run (Line 9927, "Forms.pas" + 26) + $3
[004369AE]{bds.exe } bds.bds (Line 200, "" + 8) + $FFFB
PS:我用的是Mapx5.0版本,这版本在BCB6.0中是可以安装的。
[解决办法]
有可能这个组件不支持CBuilder2010