5

我正在使用 Delphi 2007 Pro。我有一个运行时包,其中包含我正在开发的许多基于 TFrame 的复合组件。还有一个相关的设计包将这些组件安装到工具面板中。由于各种原因,这些 TFrame 后代使用了许多第三方组件,并且还相互继承,作为类层次结构。到目前为止(并且在这里得到了一些很好的建议的帮助),这种方法对于我想要完成的工作非常有效。

然而,最近我遇到了一个问题,编译/构建运行时包。最初,它与以 nxEventLog.pas 为中心的一些冲突有关,遗憾的是我未能记录其细节,但基本上类似于“此方法的定义与之前的定义不符”。就像你的实现声明与你的类声明不一致时得到的一样。此文件是 NexusDB 文件(应用程序使用 NexusDB 嵌入式服务器)。

我尝试了各种方法,但从未成功让冲突消失。我最接近的是在编译时,让 IDE 请求将完全不相关的单元的 TRUCKLOAD 添加到 contains/uses 子句。稍后会详细介绍,但如果我继续这样做,它仍然无法正常工作。nxEventLog 文件未从其原始状态更改。

无法找出为什么会出现这个错误——它出现在 Nexus 文件中,而不是我的实际包或单元中,而且我在 Nexus 代码中没有更改任何内容——我终于继续并完全卸载了 Nexus,并手动搜索以确保我已删除所有相关的 dcu 和 bpl 文件,然后重新安装。(我正在运行 Nexus 2.07)

启动 IDE 后,出现以下错误:

bds.exe - 未找到入口点
---------------
程序入口点
@Nxsddatadictionary@TnxBaseTableDescriptor@LoadFromReader$qqrp15Classes@TReader 可以不在动态链接库 NexusDB207sd110.bpl 中。
----------------------------
好的

其次是:

Can't load package ....NexusDB207dv110.bpl
Can't load package ....cmTPPanels_D2007_DesignReg.bpl 找不到
指定的程序。
您想在下次加载包时尝试加载此包吗?

Once I uninstalled the cmTPPanels runtime/design packages (my component set), via Component -> Install Package -> Remove, my other "normal Nexus DB" applications seem to work fine, including those which include Nexus's nxEventLog ocmponent. This seems to indicate the problem is definitely in my install packages somewhere.

So, having confirmed that my Nexus installation does not seem to be the actual problem, I opened up the project group which contains both packages. Building (or compiling) the runtime package, the Delphi IDE gives me the same dialog box I mentioned above:

"The following changes are necessary to make this package compatible with other installed package. Choose OK to apply these changes and rebuild the package."

Add dsnap.
dsnap contains implicit unit(s) DBClient, Provider, DataBkr, MidConst, Midas, DSIntf.

Add ibxpress.
ibxpress contains implicit unit(s) IBUtils, IB, IBSQLMonitor, IBHeader, IBIntf, IBXConst, IBXMLHeader, IBSQL, IBBlob, IBCustomDataSet, IBDatabase, IBErrorCodes, IBDatabaseInfo,
IBExternals, IBInstallHeader, IBServices.

Add IndyCore.
IndyCore contains implicit unit(s) IdIOHandlerSocket, IdSocks, IdIOHandlerStack, IdBuffer, IdResourceStringsCore, IdIntercept, IdCustomTransparentProxy, IdExceptionCore, IdSocketHandle, IdIOHandler, IdTCPConnection, IdReplyRFC, IdReply, IdTCPClient, IdIPAddress, IdAssignedNumbers.

Add IndySystem.
IndySystem contains implicit unit(s) IdBaseComponent, IdGlobal, IdStreamVCL, IdSysNativeVCL, IdSysVCL, IdSysBase, IdSysWin32, IdResourceStrings, IdException, IdSys, IdStream, IdObjs, IdComponent, IdStack, IdStackWindows, IdWship6, IdWinSock2, IdStackConsts, IdStackBSDBase, IdAntiFreezeBase.

Add Rz30DBCtls90.
Rz30DBCtls90 contains implicit unit(s) RzDBNav, RzDBLbl, RzDBStat.

Add lmdweb30_d10.
lmdweb30_d10 contains implicit unit(s) LMDWebHTTPGet, LMDHTMLObjectUnit, LMDFSSupport, LMDHTTPSupp, LMDStringsSupport, LMDURLSupp, LMDRASSupport, LMDRASCF, LMDWebConst, LMDRAS, LMDSyncUnit, LMDWebBase, LMDWebLex, LMDWebHTMLLex, LMDWebDownloadFormUnit, LMDDownload, LMDInetConst, LMDWebConfig, LMDWebInfo.

Add lmddsg30_d10.
lmddsg30_d10 contains implicit unit(s) LMDDsgPropInsp, LMDDsgPropEditors, LMDDsgMenuEditor, LMDDsgObjects, LMDDsgClass, LMDDsgCst, LMDDsgCollectionEditor, LMDDsgStrsEditor, LMDDsgPropPage, LMDDsgModule.

Add lmdstorage10_d10.
lmdstorage10_d10 contains implicit unit(s) LMDStorFormProperties, LMDStorFormHook, LMDStorBase, LMDStorConsts, LMDStorPropertiesStorage, LMDStorCommon, LMDStorINIVault.

Add ExceptionExpert11.
ExceptionExpert11 contains implicit unit(s) ExceptionLog, EDisAsm, EHash, EListView, EConsts, ETypes, ELogManager, EEncrypt, EBase64, EXMLBuilder, ECore, EWebTools, EZip, EZlib, ESockets, ELang, EHook, EDebug, ELeaks.

Add RemObjects_Core_D11.
RemObjects_Core_D11 contains implicit unit(s) uROClasses, uROSerializer, uROXMLIntf, uROMSXMLImpl, uRORes, uROMSXML2_TLB, uROClient, uRODLToXML, uRODL, uROTypes, uROHTTPTools, uROClientIntf, uROEncryption, uROZlib, uROCipher1, uROHash, uRODECUtil, uRODECConst, uROCipher, uROCiphers, uROBinaryHelpers, uROCompression, uROEventRepository, uROServerIntf, uROSessions, uRODynamicRequest, uRORemoteService, uROThreadPool, uROServer, uROAsync, uROThread, uROBinMessage, uROStreamSerializer.

Add RemObjects_Indy_D11.
RemObjects_Indy_D11 contains implicit unit(s) uROSuperTCPChannel, uROSCHelpers.

Add DataAbstract_Core_D11.
DataAbstract_Core_D11 contains implicit unit(s) uDADataTable, uDASupportClasses, uDARes, uDABusinessProcessor, uDAEngine, uDASQL92QueryBuilder, uDASQL92Interfaces, uDAWhere, uDAInterfaces, DataAbstract4_Intf, DataAbstract3_Intf, uDAHelpers, uDAClasses, uDAMemDataTable, uDAMemDataset, uDAExpressionEvaluator, uDAMacros, uDAUtils, uDAXMLUtils, uDADriverManager, uDAInterfacesEx, uDADelta, uDARegExpr, uDAScriptingProvider, uDAOracleInterfaces, uDAMacroProcessors, uDADataStreamer, uDACDSDataTable, uDARemoteDataAdapter, uDAReconcileDialog, uDAReconcileDialogDetails, uDARemoteDataAdapterRequests, uDABinAdapter.

Add VirtualTreesD11.
VirtualTreesD11 contains implicit unit(s) VirtualTrees, VTAccessibilityFactory.

Add VirtualShellToolsD11.
VirtualShellToolsD11 contains implicit unit(s) VirtualExplorerTree, ColumnForm, VirtualResources, VirtualShellAutoComplete, VirtualShellNotifier, VirtualScrollbars.

Add dxBarDBNavD11.
dxBarDBNavD11 contains implicit unit(s) dxBarDBNav, dxBarDBNavStrs.

Add dxBarExtDBItemsD11.
dxBarExtDBItemsD11 contains implicit unit(s) dxBarExtDBItems.

Add cxVerticalGridD11.
cxVerticalGridD11 contains implicit unit(s) cxDBVGrid, cxVGridViewInfo, cxVGridUtils, cxVGrid, cxVGridNewCategory, cxVGridConsts.

Add dxNavBarD11.
dxNavBarD11 contains implicit unit(s) dxNavBar, dxNavBarExplorerViews, dxNavBarConsts, dxNavBarGraphics, dxNavBarStyles, dxNavBarBase, dxNavBarViewsFact, dxNavBarCollns, dxNavBarVSToolBoxViews, dxNavBarBaseViews, dxNavBarOffice11Views, dxNavBarOfficeViews, dxNavBarXPViews.

Add dxLayoutControlD11.
dxLayoutControlD11 contains implicit unit(s) dxLayoutControl, dxLayoutCustomizeForm, dxLayoutEditForm, dxLayoutCommon, dxLayoutLookAndFeels, dxLayoutControlAdapters.

Add dxMasterViewD11.
dxMasterViewD11 contains implicit unit(s) dxMasterViewColumns, dxMasterView, dxMasterViewStrs.

Add dxdbtrD11.
dxdbtrD11 contains implicit unit(s) dxdbtrel, dxlocate, dxtree, dxdbtree.

Add dxPSCoreD11.
dxPSCoreD11 contains implicit unit(s) dxPSEdgePatterns, dxPSUtl, dxPSImgs, dxPSRes, dxPrnDev, dxPSGlbl, dxPSEngn, dxPSSngltn, dxPSESys, dxBase, dxPSCore, dxPSPrVwStd, dxPSPopupMan, dxPgsDlg, dxWrap, dxPSHFToolBarBld, dxPSfmAutoHFTextFmt, dxPSEvnt, dxPrnPg, dxPpAttr, dxBkGnd, dxFEFDlg, dxPcPrVw,dxExtCtrls, dxExtCtrlsStrs, dxPSForm, dxPSAutoHFTextMnuBld, dxfmDfnStl, dxfmMnPg, dxfmClr, dxPreVw, dxPSPrVw, dxfmZoom, dxPSExtDlgs, dxfmPNFmt, dxfmDTFmt, dxPSPrVwOpt, dxPSfmCompositionDsg, dxPSfmCompositionAdd, dxPSCompsProvider, dxPSXplorerTreeView, dxPSfmReportProperties, dxPSPgsMnuBld, dxfmChFN, dxPSfmTtl, dxPSCPDsg, dxPSfmLnkAdd, dxPSfmEditDesc, dxPSFillPatterns, dxPrnDlg.

Add dxPScxCommonD11.
dxPScxCommonD11 contains implicit unit(s) dxPScxCommon.

Add dxPScxGridLnkD11.
dxPScxGridLnkD11 contains implicit unit(s) dxPScxGridLnk.

Add NexusDB207se110.
NexusDB207se110 contains implicit unit(s) nxseAutoComponent, nxseAllEngines, nxseRecordCompressionEngineSmart, nxseRecordEngineVariable, nxseFulltextEngineCursor, nxseFulltextEngineTable, nxseRefIntEngine, nxseJournalEngine, nxseSortEngineMerge, nxseTemporaryStorageChunked, nxseRecordEngineStatic, nxseIndicesEngineSimple, nxseIndexBase, nxseHeapEngineCached, nxseBlockHeapEngineNonfragmenting, nxseBlobEngineSimple, nxseIndexEngineStaticKeyBstarTree, nxseHeaderAccess, nxseEncryptionEngineBlowfishRC4, nxseBlobEngineSegmented, nxseAutoIncEngineSimple, nxseStreamEngineSimple.

Add NexusDB207sr110.
NexusDB207sr110 contains implicit unit(s) nxsrSqlEngineBase, nxExeConst, nxsrServerEngine, nxsrBlobHandlerCaching, nxsrTimeoutHandling, nxsrTypes, nxsrBlobHandlerBase, nxsrBufferManager, nxsrFileImplWin32, nxsrStrings, nxsrEncryptionEngineBase, nxsrConst, nxsrTemporaryStorageBase, nxsrBlobEngineBase, nxsrSubEngineBase, nxsrBlobHandlerPassthrough, nxsrRecordMapperEngine, nxsrFieldMapperEngineAutoInc, nxsrFieldMapperEngine, nxsrFieldMapper, nxsrSortEngineBase, nxsrFulltextEngineBase, nxsrIndexEngineBase, nxsrRecordEngineBase, nxsrRefIntEngineBase, nxsrAutoIncEngineBase, nxsrStreamEngineBase, nxsrTableLockContainer, nxsrDataDictionary, nxsrFileHandling, nxsrServerCursorMapping, nxsrSystemStorage, nxsrRecordCompressionEngineBase, nxsrHeapEngineBase, nxsrBlockHeapEngineBase.

Add NexusDB207sq110.
NexusDB207sq110 contains implicit unit(s) nxsqlEngine, nxsqlFunctions, nxsqlDataDef, nxsqlFunctionOrganizer, nxsqlCondExp, nxsqlTableExp, nxsqlViews, nxsqlProxies, nxSQLParse, nxsqlPSM, nxsqlTest, CocoaBaseW, nxsqlBase, nxsqlDataManip, nxSQLTok, nxSQLProxiesIntf.

Add NexusDB207lg110.
NexusDB207lg110 contains implicit unit(s) nxlgEventLogDispatcher, nxlgEventLog.

Add NexusDB207dv110.
NexusDB207dv110 contains implicit unit(s) nxServerManager, nxBaseServerComp, nxConfigSettings.

Add MPCommonLibD11.
MPCommonLibD11 contains implicit unit(s) MPDataObject, MPCommonObjects, MPCommonUtilities, MPResources, MPShellTypes, MPThreadManager, MPShellUtilities.

What's weird about this, aside from the fact that includes just about everything but the kitchen sink, is that a number of the packages mentioned aren't even relevant to the components included in this package I'm trying to install; DataSnap, Indy, IBExpress, RemObjects Data Abstract, etc -- none of these are even referenced in my components.

If I click "OK" to all these added units/packages, more chaos ensues, and it doesn't compile.

The NexusDB folders, and the folders which these components I'm developing reside in, are all on my Library path, with my custom components listed last.

I'm working on a virtual machine, and can snapshot as needed, but I can't seem to get around this problem regardless, and it's clear that I don't have enough in-depth understanding of how the compiler works to know where to look for diagnosis of the problem. Anything anyone can mention which might help me do so, would be much appreciated.

4

2 回答 2

9

As a rule, these errors come from having incompatible, or, more commonly, multiple versions of the same BPL and/or DCP files on the path. Do a full search of your system for all the BPLs and DCPs, and make sure there is only one copy of each.

Tracking these types of errors down can be a massive pain in the ass. :-/

于 2009-03-20T20:11:00.270 回答
2

If you have several related packages, the build and installation order is extremely important. If package A depends on B and some unit in B changes, it sometimes goes really wrong. You can reinstall Delphi, but its better to reinstall the packages in order.

First remove all packages. (With inslall packages and remove all you can.)

Then check the registry. Sometimes some information is left which can cause problems later on.

In the HKCU\Software\ [Borland|Codegear]\[Version]\Disabled Packages, there is a list of packages that are disabled. Have a look at these. And remove anything you need.
In the HKCU\Software\ [Borland|Codegear]\[Version]\Known Packages, there is a list of all known packages. Have a look at these and remove all suspicious packages.

For older versions this infomation can be found in: In the HKLM\Software\Borland[Version]\Known Packages

Try to restart Delphi for sanity and rebuild and install anything needed in the correct order.

于 2009-07-31T09:24:41.717 回答