lookin030577
Members-
Content Count
11 -
Joined
-
Last visited
Community Reputation
0 Neutral-
Unsupported 16-bit resource in *.RC file
lookin030577 replied to lookin030577's topic in General Help
Thank you for this notion, I have already noticed in the web that this problem can exist in some older projects. But in my case it is definitely not a source of problem because the compilation and running is OK if I do not include RES directive in my compilation. -
Unsupported 16-bit resource in *.RC file
lookin030577 replied to lookin030577's topic in General Help
Thank you for the suggestions, I will try. The linker says me indeed about the duplication in the case of using RES file directive, but it does not prevent successful compilation. The error (resource is not found) is only appearing if I try to load a resource in run-time. The composition of RC file is in its simplest form (I made it in Notepad.exe) and does not contain any special symbol: MAINICON ICON "EqapAll6.ico" ACQFILESIGN BITMAP "acq.bmp" and so on. -
Unsupported 16-bit resource in *.RC file
lookin030577 replied to lookin030577's topic in General Help
Thank you for feedback, plase find the RES file attached here. However, as I made it using brcc32.exe from the shell of Delphi 10.4, I doubt that it can be damaged... And I have also tried another RC compiler, with no success. Thanks in advance! EqapAll6.RES -
Hello everyone! I am trying to compile my Delphi 6 project in Delphi 10.4. All issues with code have been solved but I encountered the problem with resourse file. In my old version of the project, I used RES file with some images/icons inside. The file is non-damaged and I can view/edit it via PEResourceExplorer.exe (https://www.portablefreeware.com/index.php?id=288). First, before the compilation I simply replaced my new empty RES file (appeared automatically in my project folder) with the old one. The compiler passed everything without warnings but the execution has raised an error about "a resource not found" when attempting to load a resource by execution of code lines. This time, the old RES file is replaced back to the new empty one. Next, I made a RC file and compiled it by brcc32 (in Delphi 10.4 "bin" folder, without any specific params) to get RES file. This file can be read by PEResourceEexplorer as well. Then I put the newly compiled RES file to the project folder... and it gave me exactly the same result as before. Of cource, in these two ways I used {$R MyProject.RES} directive in my *.DPR file. Also, the result is not sensitive to the selection of Project -> Options -> Resource Compiler -> Resource compiler to use: in both cases I have non-discriminate effects during compilation and running. Finally, I put the RC file with proper references to the original resources just into the project's folder, selected brcc32 in "Project -> Options -> Resource Compiler -> Resource compiler to use", replaced the directive in *.DPR file to {$R MyProject.rc}. Here, the compilation is terminated with the following message: [dcc32 Error] E2161 Error: RLINK32: Unsupported 16bit resource in file "...\MyProject.rc". This is also independent of the selection of "Resource compiler to use" option since I have everything the same after selection of "Windows SDK Resource Compiler" instead of brcc32.exe. Also, when I try additional RC compiler options (like "-16" to produce 16-bit RES file or "-32" as default), this makes nothing new. However, if I use {$R MyProject.rc, MyProject.RES}, the result is exactly as in the first way (i.e. when I use RES file). And from this point I am really blunted what was wrong in my attempts. As I said before, the compilation by brcc32 itself resulted in a readable RES file so I would expect that the problem is not with this file or its content. I would appreciate for any help!
-
Where to put previously compiled dcu-files (subfolders in Lib folder)
lookin030577 replied to lookin030577's topic in Delphi IDE and APIs
Many thanks for all the suggestions! -
Where to put previously compiled dcu-files (subfolders in Lib folder)
lookin030577 posted a topic in Delphi IDE and APIs
Hello everybody! I have another question which is related to the compilation of old packages. To compile my old project, I was needed to put some source *.pas/*.dcu files into "Lib" folder within IDE folder (as it was typical for Delphi 6, e.g. "C:\Program Files (x86)\Embarcadero\Studio\21.0\Lib") - just the units that are referred to in "uses" section. The folder contains a set of subfolders for different OS, so I have to select appropriate one to copy the old files into debug/release subfolders. I am working on Windows 7 (SP1) 64-bit version (as I can see from the System info as well as from the info provided by Delphi), but if I select "win64" to put files there, the compiler warns me that it is unable to find the compiled *.dcu files. However, if I select "win32", the compilation is succesful. Am I wrong with my understanding what is the 32/64-bit? Thanks in advance! -
How to add components to a new "Component Toolbar" page
lookin030577 replied to lookin030577's topic in Delphi IDE and APIs
Thanks a lot! Adding the command "ForceDemandLoadState(dlDisable)" solved everything. -
How to add components to a new "Component Toolbar" page
lookin030577 posted a topic in Delphi IDE and APIs
Hi everyone! I compiled my old-version (Delphi 6) package with both design-time and run-time components in Delphi 10.4 Community Edition. The compilation was OK, the package was installed without erros/warnings and it can be seen in the Installed Packages list (the list of installed components with their icons is available for viewing too, if I click to my package). However, no new tab is appeared in the Component Toolbar, as well as no new tab can be found if I right-click on the Toolbar Area (to see the names for all available tabs). In the old version of Delphi 6, this worked well and immediately. Thank you in advance for advising me! Oleg -
Getting of dynamic array from Variant
lookin030577 replied to lookin030577's topic in RTL and Delphi Object Pascal
I apologize for my inattentive analysis of my Delphi 6 code - the line with this text: rv:=@TVarData(Value).VArray.Data is never executed in my code - instead I use another way to implement the conversion between Variant and 1D/2D array of a given type. So it seems you are totally right with the supposing that this line is out-of-sense and should not work properly. My apologizes again and many thanks for help! -
Getting of dynamic array from Variant
lookin030577 replied to lookin030577's topic in RTL and Delphi Object Pascal
Remi, thank you a lot, I will work closely with your suggestions. However, the first line in my code (that is the line used in Delphi 6) was not only successfully compiled there but also returned a valid array (surely, I used the VarType(Value) flags to check if it is an array and what type of the array) if executed. I hardly understand the whole strusture of TVarData and I agree that it looks strange to use pointer reference (@) to a pointer in this line: @TVarData(Value).VArray.Data where VArray.Data is a pointer according to the documentation. But this worked quite well in Delphi 6 so my great wonder now why it does not work in the later version of IDE. -
Hi everybody! I am transferring my old Delphi 6 code into IDE Delphi 10.4 Community Edition. I encounter a compilation error while using these lines: type TDoubleArray = array of double; var Value: Variant; //this variable is assigned to a dynamic array somewhere in the code ... procedure DoSomething; var rv: TDoubleArray; begin rv:=@TVarData(Value).VArray.Data; // here I get the compilation error "Incompatible types Dynamic array and Pointer" but in Delphi 6 this line is compiled without warnings rv:=TDoubleArray(@TVarData(Value).VArray.Data); //here I have no warnings about the compilation end; My question is why the first line is not allowed for the compiler? Many thanks in advance!