I'm trying to install GLScene into RAD Studio 2010, with the aim of using it from a mostly C++ project. I downloaded the latest snapshot (5991, November 2011) and have been trying to compile and install the two main packages: GLScene_DesignTime and GLScene_RunTime. I haven't even tried some of the other libraries (CUDA, etc), I just want to get the base packages running.
I've encountered a number of problems, one of which I can't solve, and I'm seeking the help of anyone on SO who has successfully installed GLScene, or might know how to solve these Delphi compiler errors.
First problem (solved?)
When compiling, a number of files gave the following error:
[DCC Warning] GLSelection.pas(297): W1025 Unsupported language feature: 'abstract class method'
This is caused by a method declaration something like:
TGLBaseSelectTechnique = class
public
class function IsSupported: Boolean; virtual; abstract;
It seems that a virtual abstract class method is not supported in Delphi 2010, and I have solved it by removing 'abstract' and providing a dummy implementation, e.g. just returning false.
The second problem (not solved) - Delphi compiler fatal errors
I am now encountering two more serious errors. When compiling, the compiler fails like so:
[DCC Fatal Error] Exception EAccessViolation: Access violation at address 05AE8ED9 in module 'dcc140.dll'. Read of address 00000003
[DCC Error] Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
It doesn't say what file caused this, but I think it's caused by Spline.pas. Occasionally and not as often, I get this:
[DCC Fatal Error] Spline.pas(1): F2084 Internal Error: AV062D8ED9-R00000003-0
This indicates Spline.pas, and I think the first error is probably related to the file too, because after getting the first one if I then clean the project, cleaning will fail saying it could not delete Spline.hpp. (I have to close and reopen the IDE.) Spline.hpp just contains the following:
// CodeGear C++Builder
// Copyright (c) 1995, 2009 by Embarcadero Technologies, Inc.
// All rights reserved
// (DO NOT EDIT: machine generated header) 'Spline.pas' rev: 21.00
#ifndef SplineHPP
#define SplineHPP
#pragma delphiheader begin
#pragma option push
#pragma option -w- // All warnings off
#pragma option -Vx // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp> // Pascal unit
#include <Sysinit.hpp> // Pascal unit
and there it stops. It looks to me like it failed when trying to generate the HPP file.
I always get one of these two failures. The second is the only one I can tie to a specific file; the first fails halfway through the project, but I can't see where it got up to when it failed. I am compiling from inside the IDE.
I've looked in Spline.pas, and it seems pretty basic code - I can't see anything unusual at all. You can find it here, and apparently the file hasn't been touched for seven years... so I think it should compile :)
If I change the project settings so it does not generate headers, it compiles fine. (Generating just obj files, and any other of the settings that does not include "headers", all work fine.) But this isn't a good workaround for me - after all, I need to use it from C++ Builder, so my normal setting would be "Generate all C++ Builder files". At a bare minimum, I need HPP and OBJ files.
Has anyone here used GLScene in a recent version of C++ Builder? Have you encountered similar problems? Any idea how to solve this one?
I am using:
RAD Studio 2010 (fully patched and up to date; DDevExtensions and IDEFixPack installed.)
The November 2011 snapshot; I tried the March 2011 snapshot too, and got the same problems. Link to snapshots here.
The Delphi 2010 packages modified only by changing the linker output to generate C++ Builder files; and also the BCB 6 packages. Both give the same errors.
Edit: GLScene now has compatibility with RAD Studio XE3 (including C++ Builder.)
Now there is full compatibility of GLScene with Embarcadero RAD Studio
C++Builder XE3 as in design and runtime mode.
You can download it from http://yadi.sk/d/o1QGI2KA10MK1 (95Mb)
-- from Pal Wassail's post on the Embarcadero forum thread.
{quote:title=David M wrote:}{quote}
Hi,
I'm trying to install GLScene into RAD Studio...
David
And here is more simple Test for EMB developers of Delphi XE3 header generator -
1.Create a VCL Form Application
2.Add in Unit1.pas interface section
type
TVector3f = array[0..2] of single;
TVector4f = array[0..3] of single;
function VectorAdd(const v : TVector3f; const f : Single) : TVector3f; overload;
function VectorAdd(const v : TVector4f; const f : Single) : TVector4f; overload;
3.Add in implementation section
function VectorAdd(const v : TVector3f; const f : Single) : TVector3f;
begin
Result[0]:=v[0]+f;
Result[1]:=v[1]+f;
Result[2]:=v[2]+f;
end;
function VectorAdd(const v : TVector4f; const f : Single) : TVector4f;
begin
Result[0]:=v[0]+f;
Result[1]:=v[1]+f;
Result[2]:=v[2]+f;
Result[3]:=v[3]+f;
end;
Set Delphi Compiler option “Generate C++ .objs, headers, namespaces, export”
Build the project
Then Delphi XE3 compiler generates wrong header file Unit1.hpp with lines:
extern PACKAGE TVector3f __fastcall VectorAdd
(float const v, const float f)/ overload */;
extern PACKAGE TVector4f __fastcall VectorAdd
(float const v, const float f)/ overload */;
If now you are trying to use this header file Unit1.hpp in my.cbproj you get fatal error:
“E2238 Multiple declarations in …”
Yes, if you change vector array types to records:
TVector3f = record
case boolean of
true : (Coord: array[0..2] of single);
false : (X,Y,Z: single);
end;
then the problem could be solved, because in this case Delphi compiler generates
extern PACKAGE Vectortypes::TVector3f __fastcall VectorAdd
(const Vectortypes::TVector3f &v, const float f)/* overload */;
extern PACKAGE Vectortypes::TVector4f __fastcall VectorAdd
(const Vectortypes::TVector4f &v, const float f)/* overload */;
and you could build your C++Builder VCL application without "Multiple declaration " error. It was done for old GLScene version in 2007, but now you need to rewrite some part of code in new library, starting from VectorGeometry.pas module.
There are second way to fix such automatic header's errors - improvement of Delphi compiler in Generating C/C++ headers, namespaces and packages option. But it's in hands of EMB developers.
Here's how I do it:
Download and extract this ZIP file (directly into the root folder of GLScene, allowing it to overwrite as necessary)
Load up the appropriate RAD Studio version (2007 to XE2) and open the file *GLScene_Group.groupproj* (where = your RAD Studio version)
Build/Install each Package in group order
I have carefully assembled these fixed packages to ensure they all install and function properly from 2007 to XE2. Some packages (at the bottom of each group) require additional dependencies to function (such as the Python package) so be mindful of these.
I have tested and confirmed that these work on RAD Studio 2007 to XE2 only.
Don't forget to add the \Source folder (and all subfolders) to the Search Paths (either for the IDE itself or an individual Project, as you desire) otherwise the projects using GLScene components will fail to compile complaining of missing units.
Enjoy!
Not for RAD Studio 2009 but for old GLScene installation in BCB6 she was running well. But current version after installation in RAD Studio XE/XE2/XE3 does not work at all. It seems that the main problem is hidden in overload mechanism of procedures in Vectorgeometry.pas, so Delphi compiler (with using an option for Output of all C++ files and packages) creates coincident strings in Vectorgeometry.hpp and others. Thus you have visual components in C++Builder panel, but your application fails with errors during building. It must be repaired in .pas files by GLScene developers.
When you trying to build an application with GLScene under C++Builder XE3 you will get over 50 BCC32 errors in glcrossplatform.hpp, vectorgeometry.hpp and so on. There is a way to repair the library on your own discretion. Make a new copy of GLScene directory. In GLCrossPlatform.pas rename the procedure RGB to GLRGB (it's work!). Then in VectorGeometry.pas and in many others files of source codes change all overload procedures with slightly different parameter names, so you should't encounter coincident procedures in .hpp files after Delphi option output C++ (last option that includes packages). Then rebuild all GLScene packages. At the end of the process I hope it should work for C++Builder XE3.
I have exact he same errors.
#The second problem
Go to "spline.pas" and change
TCubicSplineMatrix = array of array[0..3] of Single;
to
TCubicSplineMatrixEx = array[0..3] of Single;
TCubicSplineMatrix = array of TCubicSplineMatrixEx;
Now "Rad Studio 2009" can compile and install GLScene for C++Builder. I can start a new C++Builder VCL Application and select GLScene components from the toolbox and drop in my VCL form.
I think, this is the solution for your basic problem, but unfortunately I can not compile my VCL project successful. I get over 50 BCC32 errors in glcrossplatform.hpp and vectorgeometry.hpp. If anyone can help here, that would be great.
#Your First problem
I get this warnings too, but I have nothing changed for it. Just ignore it?!
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.
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. :-/
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.