thomedy 0 Posted May 6 Im using Delphi 11.3 I have a project using VCL It is finding the wrong library I cant find why error message [dcc64 Fatal Error] projname.dpr(33): E2213 Bad packaged unit format: c:\program files (x86)\embarcadero\studio\22.0\lib\Win64\release\vcl.dcp.Vcl.Forms - Expected version: 35.0, Windows Unicode(x64) Found version: 96.0, Windows Ansi(CIL) I should say 32 bit works fine And other proj in this group proj use vcl and they work fine in 32 and 64 bit Im somewhat new to delphi please help thanks Share this post Link to post
JonRobertson 72 Posted May 6 Either the error you posted is not a true copy of the error message or something is wrong in your DPROJ. There are no "vcl.dcp.vcl.*" files in the Releases folder or any other folder under Embarcadero\Studio\... My suspicion is that you are building a project for 64-bit and the compiler is finding a DCU previously built for 32-bit. If the unit's source has not changed, the compiler will not rebuild the DCU even though the DCU was built for a different platform. I wish the compiler dealt with this better. The first thing to try is Project->Build (Alt-P then B, or Shift-F9 should also work). If you still get a similar error, post the error message again and your DPROJ file, if possible. Share this post Link to post
thomedy 0 Posted May 6 I inherited this project from the prev author/dev and im new to delphi let me try right now Share this post Link to post
thomedy 0 Posted May 6 yeah the same thing and just so i have said this i have done that before and i usually clean first redactedHostTransfer.dproj I should also ssay i only get this error when i set debug dcu's to true with that setting at false i get no errors at build time I get an access violation at run time [dcc64 Fatal Error] projname.dpr(33): E2213 Bad packaged unit format: c:\program files (x86)\embarcadero\studio\22.0\lib\Win64\debug\vcl.dcp.Vcl.Forms - Expected version: 35.0, Windows Unicode(x64) Found version: 110.101, Android(CIL) Share this post Link to post
Die Holländer 45 Posted May 7 (edited) Not sure, but if you think the dproj is invalid. Make a copy, delete it from the project folder and open the *.dpr file and rebuild. It will create a new dproj. <edit> Ah, I see your last message and it errors on the *.dpr file.. You should look into this file.. Edited May 7 by Die Holländer Share this post Link to post
David Heffernan 2345 Posted May 7 Is it possible that your installation has been corrupted. Why would there be Android files under Win64? Share this post Link to post
Lajos Juhász 293 Posted May 7 11 hours ago, thomedy said: 11 hours ago, JonRobertson said: Either the error you posted is not a true copy of the error message or something is wrong in your DPROJ. There are no "vcl.dcp.vcl.*" files in the Releases folder or any other folder under Embarcadero\Studio\... Bad packaged unit format: The error is: E2213 Bad packaged unit format %s.%s (Delphi) https://docwiki.embarcadero.com/RADStudio/Alexandria/en/E2213_Bad_packaged_unit_format_%s.%s_(Delphi) In this case it is looking in the vcl.dcp and looking for vcl.forms both the dcp and the unit exists in Delphi. It could be a search path issue, damaged dcp or failed compilation on the source. In earlier versions when I got similar errors the solution was to compile every package that my application uses. Then the error magically disappeared (in those cases the compilation never failed, however the compiler failed to locate the correct files. A 32-bit application that uses runtime packages). Share this post Link to post
thomedy 0 Posted May 7 (edited) 7 hours ago, Die Holländer said: Not sure, but if you think the dproj is invalid. Make a copy, delete it from the project folder and open the *.dpr file and rebuild. It will create a new dproj. <edit> Ah, I see your last message and it errors on the *.dpr file.. You should look into this file.. Im going to google how to perform this action like i said i inherited this project from a previous dev and up until this project i had not touched delphi <edit/update> I got it rebuilt Edited May 7 by thomedy Share this post Link to post
Lajos Juhász 293 Posted May 7 First step is to create a backup of the original dproj. This is required to be able to copy the required settings for the project that is written in the dproj. If you delete the dproj and open dpr Delphi will create a dproj with default settings. You can try to compile it (depends on your project it might be successful). If you cannot compile the project with the new dproj you will have to add required paths to the project until you can compile it. Share this post Link to post
David Heffernan 2345 Posted May 7 47 minutes ago, Lajos Juhász said: First step is to create a backup of the original dproj. This isn't going to be necessary because it will be under revision control 1 Share this post Link to post
thomedy 0 Posted May 7 18 minutes ago, David Heffernan said: This isn't going to be necessary because it will be under revision control agreed but i did it anyway for easier comparison this project had millions of lines of code when i stepped into it and decades of dev time i have alot to learn i cant tell if rebuilding the dproj fixed it yet because im still reassembling search paths Share this post Link to post
Achim Kalwa 61 Posted May 8 On 5/6/2024 at 10:55 PM, thomedy said: error message [dcc64 Fatal Error] projname.dpr(33): E2213 Bad packaged unit format: c:\program files (x86)\embarcadero\studio\22.0\lib\Win64\release\vcl.dcp.Vcl.Forms - Expected version: 35.0, Windows Unicode(x64) Found version: 96.0, Windows Ansi(CIL) Same here when compiling GExperts and switch from Debug to Release mode or vice versa. The number in last part "Found version" changes randomly. I've reported this months ago as https://quality.embarcadero.com/browse/RSP-42675 During the webinar "What's coming in RAD Studio 12.1" in the Q & A session I asked for an update to this bug; and Marco Cantù replied by email: Quote It is a known issue. The problem is the IDE takes the data from the DCP file in memory (likely partially illegal), it's an open issue. As a workaround, you can compile from the command line or use the "Use MSBuild externally to compile" option (better is for both debug and release) and everything works, you can alternate build types form the IDE. Also make sure that each build configuration uses a separate DCU output folder in the project options, like ".\$(Platform)\$(Config)". Share this post Link to post
Vincent Parrett 750 Posted May 8 I have been battling this problem for a very long time. I don't recall the exact version it started happening, but I reported it on the old bug tracker (before jira) - I remember Allen Bauer looking into it but they never did find a cause/solution. In my case I have a project group with around 100 projects, where most are packages and the last few in the list are exe's that use those packages - I usually see the error when it gets to the exe's during the build. Sometimes just building again works, but most of the time I end up restarting the IDE. Share this post Link to post