Cannot use FireDAC with RAD studio 10.2 release 1 - delphi

I've updated RAD Studio 10.2 to the recent 10.2.1 release.
Now, when I compile a previously working program, I get this error :
[dcc32 Fatal Error] TestForm.pas(7): F2051 Unit FireDAC.Stan.Error was compiled with a different version of FireDAC.Stan.ResStrs.S_FD_PgUnsupTextType.
It's easy to reproduce on an empty project : I simply insert a TFDPhysMySQLDriverLink or TFDMSSQLDriverLink FireDAC component on a form and I get the same error.
Could you help me ?
--- Edited ---
I've kept RAD 10.1 Berlin installed but it seems that paths are completely separated between both installs (18.0 versus 19.0 directories).
I've installed RAD 10.2.1 yesterday and I've not changed any system path. It was working perfectly with RAD 10.2...
The compiler path of the Test project (see above) is empty.
Here are the "Tools/Options/Delphi Options/Library/Library" paths :
$(BDSLIB)\$(Platform)\release
$(BDSUSERDIR)\Imports
$(BDS)\Imports
$(BDSCOMMONDIR)\Dcp
$(BDS)\include
Here are the related delphi environment variables :
$(BDSLIB) == h:\program files (x86)\embarcadero\studio\19.0\lib
$(BDSUSERDIR) == H:---CCF\Users\CC\Documents\Embarcadero\Studio\19.0
$(BDS) == h:\program files (x86)\embarcadero\studio\19.0
$(BDSCOMMONDIR) == C:\Users\Public\Documents\Embarcadero\Studio\19.0
These paths are correct except H:---CCF\Users\CC\Documents\Embarcadero\Studio\19.0 which doesn't exist.
$(BDSLIB) leads to the correct versions of FireDAC.Stan.ResStrs.dcu (dated on 29/07/2017).
I've tried to displace "h:\program files (x86)\embarcadero\studio\18.0" directory but the problem is still the same.
When I include the H:\Program Files (x86)\Embarcadero\Studio\19.0\source\data\firedac in my project search path, this solves the issue but the FireDAC DCUs come into my project and this is not a normal situation.

Related

Clang64 runtime Error readking OKBitBtn.Kind: Resource BBOK not found - Clang32 all ok

RAD Studio 10.4.2 C++Builder running on Windows 10 Pro 64-bit PC. Target VCL Win64 (ie Clang64 compiler).
I have a large C++ project that is under development using VCL Clang64. I am compiling using static linking of all RTL libraries and all installed component packages.
It was compiling and running OK before. I've added some new stuff, and now it compiles and links without reporting any errors, but when I run it I get an error box and the application doesn't run (doesn't even start up). The error box says.
Error reading OKBitBtn.Kind: Resource BBOK not found
I have used Notepad++ "find in files" to search all directories for a file containing BBOK, but it says "none found".
If I compile with the "Use runtime packages" project option enabled, I get an AV when I try to run the EXE file.
If I compile and link using Clang32 (target = Win32) with static linking, it runs ok - no sign of any errors (but I need a 64-bit application to interface to my PostgreSQL database using FireDAC, so this experiment won't talk to the database, as expected).
I am at a loss as to what can cause this error, and what debugging steps I should take to track it down and solve it.
(thanks to Remy for making edit improvements to my mquestion)
Thanks to help from David Millington and Miguel Moreno (provided by skype conversation I now have the solution:
I have some of my own VCL components that are written in C++ (and work with the classic compiler). I had these de-selected in the "installed packages" list - but they were still listed (with empty check boxes). I know that RAD studio 10.4.2 (and earlier) does not work well with VCL components written in C++ and compiled with clang32 or clang64 compilers.
If I "remove" these components from the list then the problem is solved. At this point I have no idea why this happens.
This is a bit of a pain as it means swapping from projects that use the components with classic compiler (many) to the big project I am spending a lot of time on is not convenient. However it is an acceptable workaround. I am hoping that this issue will be fixed in the coming RAD Studio 11 version.

Delphi migration fastreport issue

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.

Can't load package DbxCommonDriver180.bpl error. C++ builder XE 5

We currently have a ticket open with Embarcarderro support but we are wondering if someone else have encountered this problem, and if so how did they fix it.
We are currently trying to update our IDE from XE to XE5. When we compile and run the exe on the same machine we build it on everything works fine. But when we try to run the exe on another machine that does not have an IDE installed, we are getting the following error.
ERROR in Create_dbExpress_Connections: Can't load package DbxCommonDriver180.bpl.
The problem is, I'm pretty sure that 180 files are used with XE4. We are not or have ever used XE4 on any of our computers. We are included DBXCommonDriver190.bpl and rtl190.bpl with our exe.
We have tried the following with no success
In the link below, we tried to search for a driver.ini file. We didn't find the file however we did find a dbxdriver.ini file which had no reference to DBXCommonDriver180.bpl
http://qc.embarcadero.com/wc/qcmain.aspx?d=119396
We tried dumping all of the 190.bpl files from the build environment to a clean environment, and got the same error.
We were also told that we should probably, make the following changes to our project
C++ Linker->Link with Dynamic RTL = false
C++ Linker->Link with the Delphi Runtime Library = false
Packages->Runtime packages->Link with runtime packages = false
When we tried to make these changes, our projects would not compile.
We are trying to use C++builder XE5 update 2 and installed hotfix 2.
Please any help will be greatly appreciated.
After talking with coworkers and Embarcardero support, we found the problem.
We need to bundle a ini file called dbxdrivers.ini and place it in the same directory as the executable file.

Why Delphi says "Unit xxx compiled with a different version of yyy" if all my paths are correct?

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.

Unit ExtActns was compiled with a different version of UrlMin.IBindStatusCallBack?

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!

Resources