I've just installed Delphi 10.1 Berlin, and I've run into a problem with the library path. When using units in the library path (at least some), Delphi can't find them , and gives an F2613-error, "Unit XXX not found".
To set up a very simple test, I created a unit called "SampleUnit.pas", with a single function (sum) in it, put the file in a newly created folder, "C:\TempLibrary", and added this folder to Options->Delphi Options->Library->Library path. I checked the spelling several times, and I am totally sure that everything is correct. I then made a console application like this
program Project1;
{$APPTYPE CONSOLE}
{$R *.res}
uses
SampleUnit;
begin
writeln(Sum(12,13));
end.
and compiled it. Boom, "[dcc32 Fatal Error] Project1.dpr(9): F2613 Unit 'SampleUnit' not found."
If I replace the offending line with
uses
SampleUnit in 'c:\templibrary\sampleunit.pas';
it works just fine. Adding "C:\TempLibrary" to the projects search path will also solve the problem.
What am I missing? This has worked on previous versions of Delphi, and it does indeed work on other installations of the Berlin version as well (I have another installation on a virtual machine, where it works just fine)
I realize this might be a problem with my setup that may be hard/impossible for others to pinpoint, but if anyone can offer any insight as to where I should look that would be great.
UPDATE:
The problem has been solved, but I'm not sure excactly what solved it. I started a reinstall, and got a warning that said the length of my system path was close to the length limit. I cleaned the system path (removed references to old RAD studio installs among other things), then reinstalled Delphi 10.1 Berlin, and now everything works again.
It seems the problem was the length of my system path. I shortened it by removing references to earlier Delphi versions and some other obsolete stuff and reinstalled Delphi, and now everything works as before.
PS: After shortening my system path, I tried to build my test project before reinstalling Delphi, but that didn't work. Maybe something went wrong during the install, which may or may not have been caused by the length of the system path. I can't say with absolute certainty that it was the system path that caused the problem, but it seems the most likely candidate.
Related
I have my Delphi application up and running in XE2.
I am using fastreport provided with IDE.
When i tried to migrate from Delphi XE2 to delphi 10.1, I get issues for fastreport.
[dcc32 Fatal Error] fs_isysrtti.pas(615): F2051 Unit fs_iinterpreter was compiled with a different version of fs_isysrtti.TfsSysFunctions
I have added lib path in tools->options.
What can be issue over here?
The error message means what it says: there is a mismatch between the current version of fs_isysrtti and the one which was current when fs_iinterpreter was compiled. This is probably because the compiler is finding an out of date copy of fs_iinterpreter.dcu before the one it ought to find. Try searching your machine for versions of this .dcu file and renaming/hiding all except the newest (or the one in the same output folder as the compiler is trying to compile fs_isysrtti to, which is hopefully the same thing).
If your system is anything like mine (I have XE4 to D10 Seattle installed) you will find a number of versions of these dcus (fs_iinterpreter.dcu, that is).
Assuming this procedure removes the compiler's complaint, one-by-one reinstate the dcus you renamed or hid until the problem re-occurs and then you know which copy is causing the problem. Then work out how the D10.1 compiler is managing to find it and prevent it. Possibly, the compiler search path is causing it to look in the wrong place before the correct one.
Unfortunately, even if you manage to find the .dcu that's causing the problem, you may then find that the compiler raises a similar complaint about another Fast Report .dcu. If is does, then your easiest option may simply be to hide/rename all the FR files and reinstall it.
Uninstall FR, install it again and remove pas files from LibD24 folder
or
install all updates for Delphi 10.1 Berlin and use latest FR 5.5.11
I 've just got the same issue when I tried to convert old quickreport files to Fastreport 6.2.1 (Delphi 10.3.3 64 bit Target)
I found an easy solution here:
https://wiert.me/2016/06/30/built-in-delphi-xe6-xe7-and-xe8-fast-reports-have-issue-f2051-unit-fs_iinterpreter-was-compiled-with-a-different-version-of-fs_isysrtti-tfssysfunctions/
if the link wont work:
you have to move the *.pas files from the path
"c:\Program Files (x86)\FastReports\LibD26x64"
(it was my path, check yours. /where the fs_isysrtti.pas/)
and it works.
I have developed a Delphi application (XE4) on a Windows XP machine.
When I copy all the project files to a Win 7 machine (also Delphi XE4) it will not compile.
The source has uses Vcl.Grids and the compiler complains it can't find vcl.grids.dcu.
Changing to uses grids works but I don't want to edit all the source.
I've checked the Embarcadero website for information on Namespaces but couldn't find anything useful.
I know it's possible to say uses vcl.grids under Win 7 so there must be some setting somewhere in the project that is preventing the resolution.
I've tried deleting the dproj files but that had no effect.
How do I get the source to compile with minimal changes?
The error has nothing to do with OS. It means your IDE/Projects's search paths are not configured correctly, or your project is missing references to the relevant packages, so double check that.
Also, you can use uses Grids in the code, and then make sure Vcl is listed in the Unit scope names field in the Project Options.
The information that you describe seems to be erroneous. The compiler is not affected by the operating system on which it runs. Running the same compiler on the same source code on a different operating system does not result in compiler errors.
Here are the reasonable explanations for your problem:
You are compiling the code on different versions of the compiler. Your error message matches what happens when you compile modern namespace aware code on XE or earlier.
Your are not compiling the same source code on both machines.
It is extremely hard to see beyond these two explanations.
Ok, red face time. Turns out I was running an earlier version of Delphi on the Win 7 machine. Delphi XE4 was installed along with an earlier version and I was invoking the earlier version.
Once I actually brought up XE4 on the Win 7 machine the issue vanished.
So I will don a hair shirt and crawl under my rock.
Thanks everyone who contributed.
I'm having trouble in Delphi XE, I have a project which uses QRDesign (part of QuickReports).
The error I'm getting when I view a unit that uses QRDesign is:
"The program can't start because QRDBASE_DXE.bpl is missing from your computer. Try reinstalling the program to fix this problem."
If I don't open the unit everything compiles fine.
Interestingly if I uninstall this and another package (dclqrd_DXE.bpl - also part of QRDesign), restart the IDE, recompile and reinstall these packages it all works again until I restart the IDE. The BPLs are in the search path, and only one copy of each file exists.
Does anyone know of some mechanism that might be causing this issue?
Search for the file and move it to the Delphi's BPL directory. It looks like a misconfiguration.
You may need to move a few BPLs too. Note the directories first.
First of all I would like to apologize for the question itself. I simply could not make anything better. Well, the question then follows with examples and detailed ...
I manually installed QuickReport Delphi 2006 from their sources. It is composed of two packages a "DesignTime" and a "RunTime".
My Delphi is configured to build the BPL files in "D:\BPL" and DCP files on "D:\DCP" for all packages compiled on my Delphi
The source code of QuickReport are in "D:\QuickReport" and their packages (design and runtime) are configured to save the compiled units (DCU) in the folder "D:\QuickReport\DCU." This was the only configuration done in the packages. Nothing is set up with different paths and, BPL and DCP files are placed correctly in the folders I've set up, as I mentioned earlier.
With these settings I was able to build and install QuickReport without problems (just a few compiler warnings, which I believe are normal). All QuickReport components appear in your palette in Delphi, which does not emit any error on start proving that the components are properly installed and all packages were found.
Now comes the test: I started a new win32 application, completely empty, just a blank form. Then it put a QuickReport component (TQuickRep). The first thing I noticed was that the unit "QuickRpt", which is automatically placed in the clause "uses" of the "interface" is underlined in red indicating that something is wrong.
When I perform a CTRL+ENTER in "QuickRpt" unit (uses clause), the Delphi finds the source file (.pas) correctly, which is in "D:\QuickReport" then I ran a BUILD ALL command and the following compilation error appeared:
[Pascal Fatal Error] Unit1.pas (7): F2051 Unit QuickRpt was compiled with a different version of QRExpr.TQREvElement
That's it!!!
This error is only happening with Quick Report. I have other third-party components installed using the same configuration as the paths and they all work properly.
Finally I was able to solve this problem. #RRUZ and another friend gave me the tip: An lost QuickRpt.dcu file on my system. There were a QuickRpt.res file also. I found them, but the place was very improbable to me: The delphi LIB folder!!!
Well, i have some clues about this bizarre thing.
Until Delphi 7, the QuickReport was shipped together with the IDE however, it was disabled by default. On that Delphi version, all we need to do is to register the bpl to gain full access to QuickReport!
On Delphi 2006, the QuickReport is not part of IDE and there are no BPL to register, however the guys at Borland forgotten to remove all files from the old QuickReport. The Delphi Lib Folder is one of the first folders to be checked on Delphi start, so, if there are old files there, new files on another place would be never compiled, generating the annoying error!
This problem may be present on Delphi 2005 too.
I am getting this message now :
"Unit ExtActns was compiled with a different version of UrlMin.IBindStatusCallBack"
when i try to compile two old projects of mine in Delphi 7 on a new machine:
I have checked and double checked that the library paths are indentical on the current machine they are compiling on and the new machine i have set up.
Anyone know what is going on?
Thanks
What that usually means is that there's something in UrlMin.dcu that's not compatible with ExtActns, but the compiler can't find UrlMin.pas to recompile it. Check your IDE paths to make sure it can find the UrlMin unit.
Turns out, it must have been an issue with Rad Studio 2010 installed. I uninstalled it, cleaned the registry and system variable paths of all instances of Rad Studio.......and everything compiles fine now!