views:

1904

answers:

3

I'm using Delphi 2007 Pro. I have a runtime package that includes a number of compound components I'm developing, which are based on TFrames. There is also a related design package which installs these components to the tool palette. These TFrame descendents use a number of third-party components, for various reasons, and also inherit from one another, as a class hierarchy. So far (and with the help of some great advice here), this approach is working very well for what I want to accomplish.

Recently I ran into a problem, however, compiling/building the runtime package. Initially, it had to do with some conflict centering on nxEventLog.pas, the details of which unfortunately I failed to record, but was basically something along the lines of "the definition for this method does not agree with the previous definition for it," like what you get when your implementation declaration doesn't agree with your class declaration. This file is a NexusDB file (the application uses a NexusDB embedded server).

I tried various things, but never was successful in getting the conflict to go away. The closest I came was upon compiling, having the IDE request adding TRUCKLOAD of completely unrelated units to the contains/uses clause. More on this later, but if I proceeded with that, it still wouldn't work. The nxEventLog file had not changed from its original state.

Unable to ferret out why this error was showing up -- it was showing up in Nexus files, not my actual package or units, and I had changed nothing in the Nexus code -- I finally went ahead and just completely uninstalled Nexus, and manually searched to try to make sure I had deleted all related dcu and bpl files, and then reinstalled it. (I'm running Nexus 2.07)

Upon firing up the IDE, I got the following errors:

bds.exe - Entry Point Not Found
---------------------------
The procedure entry point
@Nxsddatadictionary@TnxBaseTableDescriptor@LoadFromReader$qqrp15Classes@TReader could not be located in the dynamic link library NexusDB207sd110.bpl.
---------------------------
OK

Followed by:

Can't load package ....NexusDB207dv110.bpl
Can't load package ....cmTPPanels_D2007_DesignReg.bpl
The specified procedure oculd not be found.
Do you want to attempt to load this package the next time a package is loaded?

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.

+2  A: 

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. :-/

Tim Sullivan
Yeah, good luck with this one. It's a whole big pile of no fun. :(
Mason Wheeler
Yep. And it's compounded significantly if you have multiple Delphi versions. Geez, I hate that.
Tim Sullivan
FORTUNATELY, I run myseparate Delphi versions in separate Virtual Machines -- it was just too much working keeping all my third-party components all "sync'd up and happy" across multiple Delphi versions.
Jamo
See what Tim says .. ! :) Ooh, I'm so happy to see an example proving that I'm not the only one who had to go through Inprise's crap.
Liao
I think what drives me most crazy is that there is a totally easy solution to this that CodeGear can make: require all runtime BPLs and DCPs be in a specific folder called, say, thirdparty. Load from there exclusively for the IDE. Add the path to that folder so that programs compiled with packages can find them. Relying exclusively on the path has caused so many headaches for so many people.
Tim Sullivan
+2  A: 

Rather than trying to find the reason, re-install Delphi from scratch and install / compile your components one by one, continually checking that everything still works fine after every install / compile. You are likely to solve the problem faster this way as it can easily be repeated using virtual machines.

mm2010
Yeah, thats probably what you would need, with Delphi. Go Borland! No, Go Inprise! No, Go Borland! No, Borland! Stay! Sit! Grrrr
Liao
+1  A: 

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.

Gamecat
Go, Codegear! Inprise? Borland? Inborland? Outprise? Borgear? Codebor? aaaaaaahhhhhhhhhhhhhhhhhhhhhhhhh
Liao