Jump to content

dmitrybv

Members
  • Content Count

    57
  • Joined

  • Last visited

Community Reputation

3 Neutral

Technical Information

  • Delphi-Version
    Delphi 12 Athens

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Is it possible to avoid such problems by simply naming pas modules "correctly"? So far I understand that you can't use the string ".Vcl." and ".Fmx." in module names. Are there any specific rules on how to correctly insert dots into package module names? After all, when creating the namespaces structure based on the pas module name, the developers of Delphi and C++ Builder modeled how developers of new packages would integrate into the current tree of nested namespaces.
  2. dmitrybv

    [bcc32c Error] hpp: expected unqualified-id

    What about namespace The constants are declared inside namespace namespace Ehlibfmx { namespace Toolcontrols { static _DELPHI_CONST System::Int8 SB_HORZ = System::Int8(0x0); } } Doesn't this isolate them from interfering with external identifiers?
  3. Hello I have a pas unit EhLibFmx.ToolControls.pas in my package which contains the following statement const { Scroll Bar Constants } SB_HORZ = 0; SB_VERT = 1; SB_CTL = 2; SB_BOTH = 3; When I try to compile a C++ project which uses this hpp file based on this unit, bcc32c gives a compilation error: [bcc32c Error] EhLibFmx.ToolControls.hpp(626): expected unqualified-id On the line static _DELPHI_CONST System::Int8 SB_HORZ = System::Int8(0x0); I can't figure out what the error is. And how to make the correction correctly. After all, hpp is generated automatically.
  4. Hello. I suspect that the C++ compiler does not allow using Delphi units from Delphi packages that contain the text ‘.VCL’ when creating VCL projects. For example, my package contains the unit EhLib.VCL.pas I use this package and the EhLib.VCL module in Delphi projects without any problems. But when I try to use the EhLib.VCL package and module in C++ Builder, I get the following compilation error. [bcc32c Error] Vcl.Buttons.hpp(68): reference to 'Vcl' is ambiguous Vcl.Buttons.hpp(44): candidate found by name lookup is 'Vcl' EhLib.VCL.hpp(48): candidate found by name lookup is 'Ehlib::Vcl' I suspect that the statement using namespace Vcl::Buttons; using namespace Vcl; from the file Vcl.Buttons.hpp And the statement using namespace Ehlib::Vcl; using namespace Ehlib; from the file EhLib.VCL.hpp somehow conflict with each other. Do C++ Builder projects really have such limitations and how to bypass them?
  5. Hello. Embarcadero® RAD Studio 12 Version 29.0.53982.0329 I have a Delphi package with components. And I use them to create Delphi projects without any problems. Now I need to use these components in a C++ Builder project. In the Project Options-Building-Delphi Compiler-Output – C/C++ package settings, I set the Generate all C++Builder files (including package libs) option. When compiling the package, *.hpp files were created based on the pas files of the package. Now I create a C++ Builder project, drop my components on the form and try to compile the project. As a result, I get the following errors: C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.Types.hpp(64,13): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here on line typedef Fmx::Controls::TControl TWinControl; I can't figure out what the error is. Visually, the code section contains the correct text. The FMX.Controls.hpp file contains nested namespaces namespace Fmx { namespace Controls { And the text Fmx::Controls::… is a valid reference to a type in the nested namespace namespace Fmx { namespace Controls { Project "C:\RADStudio\23.0\EhLib.12_0-Dev\Demos\Fmx\CPPBuilderApps\TestCPPBuilderApp\Project1.cbproj" (Build target(s)): Target MakeObjs: Target CppCompile: Target _CppCoreCompile: Target _CLANGCoreCompile: c:\radstudio\23.0\bin\bcc32c.exe -cc1 -D _DEBUG -D FRAMEWORK_FMX -D USEPACKAGES -output-dir .\Win32\Debug -I C:\RADStudio\23.0\EhLib.12_0-Dev\Demos\Fmx\CPPBuilderApps\TestCPPBuilderApp -I c:\radstudio\23.0\include\windows\fmx -I c:\radstudio\23.0\EhLib.12_0-Dev\Demos\Fmx\CPPBuilderApps\TestCPPBuilderApp -isystem c:\radstudio\23.0\include -isystem c:\radstudio\23.0\include\dinkumware64 -isystem c:\radstudio\23.0\include\windows\crtl -isystem c:\radstudio\23.0\include\windows\sdk -isystem c:\radstudio\23.0\include\windows\rtl -isystem c:\radstudio\23.0\include\windows\vcl -isystem c:\radstudio\23.0\include\windows\fmx -isystem C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32 -isystem C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32 -debug-info-kind=standalone -fcxx-exceptions -fborland-extensions -nobuiltininc -nostdsysteminc -triple i686-pc-windows-omf -emit-pch -mrelocation-model static -masm-verbose -ffunction-sections -fexceptions -fseh -mstack-alignment=16 -fno-spell-checking -fno-use-cxa-atexit -fno-threadsafe-statics -x c++ -std=c++17 -O0 -fmath-errno -tR -tM -tU -tW -o .\Win32\Debug\Project1PCH1.pch --auto-dependency-output Project1PCH1.h Target _CLANGCoreCompile: c:\radstudio\23.0\bin\bcc32c.exe -cc1 -D _DEBUG -D FRAMEWORK_FMX -D USEPACKAGES -output-dir .\Win32\Debug -I C:\RADStudio\23.0\EhLib.12_0-Dev\Demos\Fmx\CPPBuilderApps\TestCPPBuilderApp -I c:\radstudio\23.0\include\windows\fmx -I c:\radstudio\23.0\EhLib.12_0-Dev\Demos\Fmx\CPPBuilderApps\TestCPPBuilderApp -isystem c:\radstudio\23.0\include -isystem c:\radstudio\23.0\include\dinkumware64 -isystem c:\radstudio\23.0\include\windows\crtl -isystem c:\radstudio\23.0\include\windows\sdk -isystem c:\radstudio\23.0\include\windows\rtl -isystem c:\radstudio\23.0\include\windows\vcl -isystem c:\radstudio\23.0\include\windows\fmx -isystem C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32 -isystem C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32 -debug-info-kind=standalone -fcxx-exceptions -fborland-extensions -nobuiltininc -nostdsysteminc -triple i686-pc-windows-omf -emit-obj -mrelocation-model static -masm-verbose -ffunction-sections -fexceptions -fseh -mstack-alignment=16 -fno-spell-checking -fno-use-cxa-atexit -fno-threadsafe-statics -main-file-name Project1.cpp -x c++ -std=c++17 -O0 -fmath-errno -tR -tM -tU -tW -o .\Win32\Debug\Project1.obj --auto-dependency-output -MT .\Win32\Debug\Project1.obj -include-pch .\Win32\Debug\Project1PCH1.pch Project1.cpp Target _CLANGCoreCompile: c:\radstudio\23.0\bin\bcc32c.exe -cc1 -D _DEBUG -D FRAMEWORK_FMX -D USEPACKAGES -output-dir .\Win32\Debug -I C:\RADStudio\23.0\EhLib.12_0-Dev\Demos\Fmx\CPPBuilderApps\TestCPPBuilderApp -I c:\radstudio\23.0\include\windows\fmx -I c:\radstudio\23.0\EhLib.12_0-Dev\Demos\Fmx\CPPBuilderApps\TestCPPBuilderApp -isystem c:\radstudio\23.0\include -isystem c:\radstudio\23.0\include\dinkumware64 -isystem c:\radstudio\23.0\include\windows\crtl -isystem c:\radstudio\23.0\include\windows\sdk -isystem c:\radstudio\23.0\include\windows\rtl -isystem c:\radstudio\23.0\include\windows\vcl -isystem c:\radstudio\23.0\include\windows\fmx -isystem C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32 -isystem C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32 -debug-info-kind=standalone -fcxx-exceptions -fborland-extensions -nobuiltininc -nostdsysteminc -triple i686-pc-windows-omf -emit-obj -mrelocation-model static -masm-verbose -ffunction-sections -fexceptions -fseh -mstack-alignment=16 -fno-spell-checking -fno-use-cxa-atexit -fno-threadsafe-statics -main-file-name Unit1.cpp -x c++ -std=c++17 -O0 -fmath-errno -tR -tM -tU -tW -o .\Win32\Debug\Unit1.obj --auto-dependency-output -MT .\Win32\Debug\Unit1.obj -include-pch .\Win32\Debug\Project1PCH1.pch Unit1.cpp C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.Types.hpp(64,13): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.GridAxisData.hpp(47,6): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.GridAxisData.hpp(102,33): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.Platform.hpp(68,59): error E4689: 'Forms' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Forms.hpp(48,10): error E6300: 'Forms' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(57,6): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(65,43): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(65,79): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(66,14): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(67,14): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(98,74): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(98,92): error E2595: expected expression C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(99,6): error E4689: 'Imglist' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.ImgList.hpp(36,10): error E6300: 'Imglist' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(101,6): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(102,6): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(103,6): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(104,6): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(105,6): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(106,6): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(107,6): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(108,6): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(109,6): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(156,17): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(157,17): error E4689: 'Imglist' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.ImgList.hpp(36,10): error E6300: 'Imglist' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(158,17): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(159,17): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(160,17): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(161,17): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(162,17): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(163,17): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ImageReses.hpp(164,17): error E4689: 'Multiresbitmap' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.MultiResBitmap.hpp(31,10): error E6300: 'Multiresbitmap' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(94,70): error E4689: 'Forms' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Forms.hpp(48,10): error E6300: 'Forms' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(98,44): error E5873: no type named 'TFmxObject' in namespace 'Ehlib::Fmx::Types' C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(107,38): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(107,83): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(109,45): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(109,130): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(121,6): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(124,6): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(125,49): error E5873: no type named '_di_IFreeNotification' in namespace 'Ehlib::Fmx::Types' C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(126,52): error E5873: no type named '_di_IFreeNotification' in namespace 'Ehlib::Fmx::Types' C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(131,17): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(138,15): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(152,49): error E4689: 'Forms' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Forms.hpp(48,10): error E6300: 'Forms' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(152,56): error E2587: expected class name C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(154,14): error E4689: 'Forms' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Forms.hpp(48,10): error E6300: 'Forms' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(157,13): error E5873: no type named 'TFmxObject' in namespace 'Ehlib::Fmx::Types' C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(158,54): error E5873: no type named 'TFmxObject' in namespace 'Ehlib::Fmx::Types' C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(159,49): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(160,36): error E4689: 'Forms' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Forms.hpp(48,10): error E6300: 'Forms' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(163,6): error E4689: 'Forms' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Forms.hpp(48,10): error E6300: 'Forms' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(164,38): error E4689: 'Graphics' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Graphics.hpp(34,10): error E6300: 'Graphics' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(170,24): error E5873: no type named 'TFmxObject' in namespace 'Ehlib::Fmx::Types' C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(171,17): error E4689: 'Forms' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Forms.hpp(48,10): error E6300: 'Forms' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(173,132): error E4689: 'Forms' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Forms.hpp(48,10): error E6300: 'Forms' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(173,139): error E4987: member initializer 'TForm' does not name a non-static data member or base class C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(184,6): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(187,27): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(188,17): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(208,6): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(212,84): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(216,17): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(218,62): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(238,133): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(257,6): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(261,74): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(263,17): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here C:\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Win32\EhLib.Fmx.ToolControls.hpp(275,52): error E4689: 'Controls' is not a class, namespace, or enumeration c:\radstudio\23.0\include\windows\fmx\FMX.Controls.Presentation.hpp(34,10): error E6300: 'Controls' declared here
  6. TComponent has a method: procedure SetParentComponent(Value: TComponent); dynamic; It is used when loading components from a stream. IDesigner.CreateComponent does not call this method, although it could.
  7. Good day. How does the IDesigner.CreateComponent method work? function CreateComponent(ComponentClass: TComponentClass; Parent: TComponent; Left, Top, Width, Height: Integer): TComponent; How does CreateComponent call the correct method on the created component to pass the Parent parameter to it? If I created my component by inheriting TComponent and my component has a method procedure TMyComponent.SetParent(AParent: TMyParentComponent); then how can I pass to the IDesigner.CreateComponent function an indication that after creating my component it should call MyComponent.SetParent(Parent)?
  8. Hello. I created a runtime package called EhLib.Rtl.dpk. Compiled the package in RAD Studio. As a result, the file DclEhLib.Rtl260.bpl was created in the folder C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\ And EhLib.Rtl.lib EhLib.Rtl.dcp EhLib.Rtl.bpi C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp\ When I create Delphi applications, I can use the components from the package without any problems. But when I create and try to compile a C++ Builder application, the compiler gives an error. [ilink32 Error] Fatal: Unable to open file 'MEMTABLEDATAEH.OBJ' MEMTABLEDATAEH is a module from the EhLib.Rtl package. It seems that the project does not see the EhLib.Rtl.bpi package. The Project-Options-Packages-Runtime Packages-Runtime package import libraries section shows that RAD Studio added the EhLib package to the package list instead of the EhLib.Rtl package. When I try to manually add the EhLib.Rtl.bpi package to the list, it adds the EhLib package, thus cutting off all the text after the first dot. Manually entering the EhLib.Rtl or EhLib.Rtl.pbi package into the package list does not solve the problem, and the compiler returns the same error. Thus, there is a suspicion that RAD Studio in C++ Builder mode does not support the dot in the package file name. Although when creating a package with a point, RAD Studio did not give any errors. Tested in Embarcadero® RAD Studio 10.3 Version 26.0.36039.7899 Tested in Embarcadero® RAD Studio 12 Version 29.0.53982.0329
  9. Exception: Project TestDemo.exe raised exception class EInvalidCast with message 'Invalid class typecast'. On the line: Val := ACaretPositionProp.GetValue(Memo1);
  10. Hello. The following code throws an 'Invalid class typecast' exception. procedure TForm1.Button1Click(Sender: TObject); var RttiContext: TRttiContext; LType: TRttiType; ACaretPositionProp: TRttiProperty; Val: TValue; begin RttiContext := TRttiContext.Create; LType := RttiContext.GetType(TMemo); ACaretPositionProp := LType.GetProperty('CaretPosition'); Val := ACaretPositionProp.GetValue(Memo1); end; Although it shouldn't. Place a TMemo and a TButton on a Form and write the Button.OnClick event as described above. Embarcadero® RAD Studio 12 Version 29.0.53571.9782 Delphi 12 Update 2.
  11. Hello. My TValue.ToString for TAlphaColor type returns a strange result. I can't figure out if it's a bug or if I'm using the TValue.ToString function incorrectly Here's an example of code. type TColorObj = class(TPersistent) private FColorProp: TAlphaColor; published property ColorProp: TAlphaColor read FColorProp write FColorProp; end; procedure TFormSimpleDraw2.Button1Click(Sender: TObject); var RttiContext: TRttiContext; Val: TValue; LType: TRttiType; ColorObj: TColorObj; AColorProp: TRttiProperty; begin ColorObj := TColorObj.Create; ColorObj.ColorProp := 4294303411; //TAlphaColorRec.Wheat RttiContext := TRttiContext.Create; LType := RttiContext.GetType(TColorObj); AColorProp := LType.GetProperty('ColorProp'); Val := AColorProp.GetValue(ColorObj); //Memo1.Lines.Add('ColorObj.ColorProp.ToString = ' + ColorObj.ColorProp.ToString); Memo1.Lines.Add('ColorObj.ColorProp.ToString = ' + Cardinal(ColorObj.ColorProp).ToString); Memo1.Lines.Add('TValue.ToString = ' + Val.ToString); ColorObj.Free; end; Here's the result. ColorObj.ColorProp.ToString = 4294303411 TValue.ToString = 18446744073708887731 Embarcadero® RAD Studio 12 Version 29.0.53571.9782 Delphi 12 Update 2.
  12. I wonder why TIniFile.ReadString sets the maximum value size to 2047 without checking the actual value in the file and without limiting the value size in TIniFile.WriteString. Stackoverflow accepted the maximum allowed value to be 65,535 https://stackoverflow.com/questions/10507927/getprivateprofilestring-buffer-length https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getprivateprofilestringw DWORD GetPrivateProfileStringW( [in] LPCWSTR lpAppName, [in] LPCWSTR lpKeyName, [in] LPCWSTR lpDefault, [out] LPWSTR lpReturnedString, [in] DWORD nSize, [in] LPCWSTR lpFileName ) ... If neither lpAppName nor lpKeyName is NULL and the supplied destination buffer is too small to hold the requested string, the string is truncated and followed by a null character, and the return value is equal to nSize minus one. But if the developers of System.IniFiles.TIniFile implemented a limit of 2047, then why did they do it only for TIniFile.ReadString (without throwing an exception when exceeded), but not for TIniFile.WriteString. unit System.IniFiles ... function TIniFile.ReadString(const Section, Ident, Default: string): string; var Buffer: array[0..2047] of Char; begin SetString(Result, Buffer, GetPrivateProfileString(MarshaledString(Section), MarshaledString(Ident), MarshaledString(Default), Buffer, Length(Buffer), MarshaledString(FFileName))); end; procedure TIniFile.WriteString(const Section, Ident, Value: string); begin if not WritePrivateProfileString(MarshaledString(Section), MarshaledString(Ident), MarshaledString(Value), MarshaledString(FFileName)) then raise EIniFileException.CreateResFmt(@SIniFileWriteError, [FileName]); end;
  13. I have a Compile.Cmd file that I run from my VCL application to compile my packages. File Compile.Cmd Call C:\RADStudio\22.0\Bin\rsvars.bat ECHO BDS=%BDS% ECHO BDSCOMMONDIR=%BDSCOMMONDIR% %FrameworkDir%\MSBuild EhLib.Rtl.dproj /t:Build /p:Config=Release /p:platform=Win32 I run this file using the CreateProcess function with the parameter CmdLine = cmd.exe /c Compile.Cmd 1.-- If I run my program from under RAD Studio 12 (Rtl Ver 23), then when I execute cmd.exe /c Compile.Cmd, an error is displayed: cmd.exe /c C:\RADStudio\23.0\Projects\EhLib12_Installer\Installer\Compile.Cmd C:\Users\Public\Documents\Embarcadero\Studio\22.0\Components\EhLib\Src>Call C:\RADStudio\22.0\Bin\rsvars.bat BDS=C:\RADStudio\22.0 BDSCOMMONDIR=C:\Users\Public\Documents\Embarcadero\Studio\22.0 Copyright (C) Microsoft Corporation. All rights reserved. Done Building Project "C:\Users\Public\Documents\Embarcadero\Studio\22.0\Components\EhLib\Src\EhLib.Rtl.dproj" (Build target(s)) -- FAILED. Build FAILED. EhLib.Rtl.dpk(38): error E2213: Bad packaged unit format: c:\radstudio\23.0\lib\Win32\release\rtl.dcp.System - Expected version: 35.0, Windows Unicode(x86) Found version: 36.0, Windows Unicode(x86) [C:\Users\Public\Documents\Embarcadero\Studio\22.0\Components\EhLib\Src\EhLib.Rtl.dproj] 1 Error(s) Time Elapsed 00:00:00.23 It is clear that MSBuild starts using library files of version 35.0 and 36.0 simultaneously. 2.-- If I run my compiled exe file directly from File Explorer, the cmd.exe /c Compile.Cmd command works without errors. And MSBuild compilation occurs without errors. 3.-- Is it possible that rsvars.bat does not set all the necessary environment variables for MSBuild to work correctly and MSBuild picks up these variables from the higher-level process bds.exe and thus an intersection of versions of the base libraries is formed? For example, rsvars.bat does not set the environment variables BDSLIB and BDSBIN.
  14. Good day. What is the analogue of the CM_DESIGNHITTEST message in FireMonkey? I need my specific section of my FmxControl to receive mouse messages in DesignTime.
×