installation on c++ builder XE2

  • pratisoft

    pratisoft - 2012-04-05

    I am trying to install GLScene on c++ builder XE2, it installs well but when I try to use it gives compile time error on header files generated by delphi compiler,

    Any clues / suggestion / help shall be highly appreciated


  • YarUnderoaker

    YarUnderoaker - 2012-04-06

    Unfortunately, I don't know anybody who can do this.

  • Fintch

    Fintch - 2012-10-01

    Hi. I have try it too… I have founded that this line (in spline.pas) is responsible for the error:

    TCubicSplineMatrix = array of array of Single;

    change it to:

    TCubicSplineMatrix = array of array of Single;

    and the compiler working fine. Why? What I need to change to make it work correctly?

  • Fintch

    Fintch - 2012-10-01

    Go to "spline.pas" and change

    TCubicSplineMatrix = array of array[0..3] of Single;


    TCubicSplineMatrixEx = array[0..3] of Single;
    TCubicSplineMatrix = array of TCubicSplineMatrixEx;

    Now, you can compile and install it for C++Builder 2009.
    I create a C++Builder VCL Application, insert GLScene in it and compile..  I get over 50 BCC32 errors in glcrossplatform.hpp and vectorgeometry.hpp. If anyone can help here, that would be great. ;)

  • Pavel Vassiliev

    Pavel Vassiliev - 2012-11-13

    fintch wrote:

    I create a C++Builder VCL Application, insert GLScene in it and compile.. I get over 50 BCC32 errors in glcrossplatform.hpp and vectorgeometry.hpp. If anyone can help here, that would be great. ;)
    There is a way to repair the library. Make a new copy. In GLCrossPlatform.pas rename the procedure RGB to GLRGB, and further in VectorGeometry.pas and many others files make all overload procedures with 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 in should work for C++Builder XE3. 

  • Pavel Vassiliev

    Pavel Vassiliev - 2012-11-21

    One way to use GLScene in C++Builder XE. 
    You need to change in VectorTypes.pas unit all vector array types to records, e.g.:

    TVector3f = record
        case boolean of
          true  : (Coord: array of single);
          false : (X,Y,Z: single);

    and  then the problem could be solved, because in this case Delphi compiler generates

    for overload procedures from VectorGeometry.pas as

    function VectorAdd(const v : TVector3f; const f : Single) : TVector3f; overload;
    function VectorAdd(const v : TVector4f; const f : Single) : TVector4f; overload;

    different externals in VectorGeometry.hpp -

    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 code using BCB6 in 2004 (you could find the package in web), but now you need to rewrite some part of code in new library after changing arrays to record.

  • Pavel Vassiliev

    Pavel Vassiliev - 2012-11-24

    Finally, after three coding days, I've recovered compatibility of current SVN GLScene version
    with CPP and succesfully installed it to RAD Studio XE3. All arrays in VectorTypes.pas have been changed with records as was done earlier for old Borland C++Builder 6. Now it seems that all works well with some miner bugs as in design time and runtime on CPP examples from altered Delphi and BCB Demos. Yet there are ambiquity between Glcrossplatform::TPoint and System::Types::TPoint and Vectorgeometry::TVector and System::Types::TVector and so on. But it may be resolved later.

  • Pavel Vassiliev

    Pavel Vassiliev - 2012-12-03

    Now there is full compatibility of GLScene with Embarcadero RAD Studio C++Builder XE3 as in design and runtime mode.
    The compatibility with C++Builder XE3 is reached now and 
    you can download it from (95Mb)


  • pratisoft

    pratisoft - 2013-05-28

    Thanks, it works well.

    It works well but when you try to open material editor it gives exception: The reason is the mistmatch in FRMaterialPreview.pas and FRMaterialPreview.dfm (in Source\PropertyEditors folder). FRMaterialPreview.pas declares few objects in its published secion but they are missing in FRMaterialPreview.dfm.

    The solution is simple:

    First uninstall package completely,

    next, download the regular glscene package (by regular I mean the general one targetted towards delphi developers through, extract it and copy file FRMaterialPreview.dfm to folder (Source\PropertyEditors) which holds the glscene C++ builder source.

    Now recompile and re-install both design time and run time package,

    you will be able to open Material Editor without any exception,


  • pratisoft

    pratisoft - 2013-05-28

    I have successfully installed it even in XE4 C++ builder too and work well

    Few points to consider when compiling demos:

    you may face link error with GLMisc.obj missing,

    this is because the demos are old and GLMisc.pas was preset then, it is not present now,

    all you do is remove the declaration "#pragma link "GLMisc" from the source and it will link

    Also if you get "JPEG.obj" error,

    in the source if present #pragma link "JPEG" change it to

    pragma link "vcl.imaging.jpeg"

    if not present in the source, add this declaration

    Last edit: pratisoft 2013-05-28

Log in to post a comment.