Cannot compile Windows app with C++ Builder 10.1 Berlin Update 2 - c++builder

I installed RAD Studio 10.1 Update 2 using the web installer. It uninstalled the previous 10.1 Update 1 and performed everything without error messages.
The new version is able to build C++ projects for Android, iOS, and Mac OSX. But when I try to compile projects for Win32, both VCL and FMX, I get this unexpected error:
[bcc32 Error] windows.h(1): E2209 Unable to open include file 'winapifamily.h'
Full parser context
Project1.cpp(3): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\vcl\vcl.h
vcl.h(10): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\vcl\basepch0.h
basepch0.h(62): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\rtl\System.hpp
System.hpp(19): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\rtl\sysmac.h
sysmac.h(141): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\sdk\windows.h

From the following article on EDN:
Issues with winapifamily.h and other header files after installing C++Builder 10
There is a known issue where occasionally, after the C++Builder and RAD Studio 10.1 Berlin Update 2 installer has run, eight header files may be missing from C++Builder’s include\windows\sdk folder.
The bug manifests as trying to build a Windows C++ application, and getting a compiler error at the top of windows.h stating that winapifamily.h was not found.
These eight headers are available in a zip file for download.
Installation
It is not necessary to close RAD Studio or C++Builder.
Download the zip file. Right-click on it and choose Extract All, and ensure the checkbox ‘Show extracted files when complete’ is checked. Click Extract.
Once the extraction is complete and the folder where the files were extracted to is opened, select all eight header files, right-click on them, and select Copy.
Open another Explorer window and navigate to:
C:\Program Files (x86)\Embarcadero\Studio\18.0\include\windows\sdk
Right-click in an empty space in the folder, and click Paste. You will be prompted for administrative permissions in order to paste into this folder. Ensure ‘Do this for all current items’ is checked, and click Continue.
Once complete, return to C++Builder and you should be able to successfully compile.

Related

How to install Indy on Delphi 10.3 Rio?

The help says "You can use GetIt Package Manager to discover and install additional third-party software onto RAD Studio." but Indy is not available in GetIt
I dowloaded newest files from Github. I run the Fullc_Rio.bat file then opened Indy260.groupproj but when compiling I got:
[Fatal Error] Cannot compile package 'IndySystem260' which is currently required by Delphi 10.3.
Indy comes pre-installed in every IDE version, and has been for a very long time.
However, if you want to install a newer version than what Embarcadero ships, you have to first remove the pre-installed version. This is mentioned in Indy's installation notes:
All package names are followed by X0 (where X0 is your Delphi/C++Builder/RAD Studio product version).
...
If Indy 10 is already installed, it needs to be uninstalled first:
Remove the pre-compiled design-time BPL files - dclIndyCoreX0.bpl and dclIndyProtocolsX0.bpl - from the IDE via the "Components > Install Packages" dialog.
Delete all of the existing binaries - IndySystemX0.*, (dcl)IndyCoreX0.*, and (dcl)IndyProtocolsX0.*
Delete any Indy 10 source files, if present.
Be sure to check for files in the IDE's \bin, \lib, and \source folders, \Indy subfolders, and OS system folders.
...
You can either:
Use the command-line FULLD#.BAT script that corresponds to your Delphi version.
Open the individual DPK files in the IDE and compile them, in the following order:
IndySystemX0.dpk (in Lib\System)
IndyCoreX0.dpk (in Lib\Core)
IndyProtocolsX0.dpk (in Lib\Protocols)
dclIndyCoreX0.dpk (in Lib\Core)
dclIndyProtocolsX0.dpk (in Lib\Protocols)
...
Refer to the installation notes for full instructions.
Indy is already installed in Rio during the product installation. It's used in parts of the RTL. It's already installed in all versions of Delphi.
If you open a new VCL or FMX application, click on a form to activate the designer, and go to the component palette, and enter TId in the search box, you can find the Indy related component pages in the palette.

Impossible to update Indy to latest version

I've been struggling to update Indy on my Delphi XE version and simply can't achieve this task.
Tried to follow exactly the instructions on
http://www.indyproject.org/Sockets/Docs/Indy10Installation.en.aspx
First i tried the option 1, that is :
1) use the command-line FULLD#.BAT script that corresponds to your Delphi version.
The BAT script runs, but when i open Delphi, i see no components installed.
So i tried option 2 :
2) Open the individual .dpk files in the IDE and compile them, in the following order:
IndySystemX0.dpk (in Lib\System)
IndyCoreX0.dpk (in Lib\Core)
IndyProtocolsX0.dpk (in Lib\Protocols)
dclIndyCoreX0.dpk (in Lib\Core)
dclIndyProtocolsX0.dpk (in Lib\Protocols)
The files compiled until 'IndySystem150.dpk', it returns the error below :
[DCC Fatal Error] IndySystem150.dpk(44): F2051 Unit IdIDN was compiled with a different version of IdGlobal.IndyCheckWindowsVersion
Has anyone ever get this update done ? Any hints please ?
Thanks !
If anyone has this problem, I could fix the issues by deleting all Id*.dcu files in the folder below :
C:\Program Files (x86)\Embarcadero\RAD Studio\8.0
After that I could compile and install the packages.
As described on Indy installation page :
"If Indy 10 is already installed, it needs to be uninstalled first. Remove the pre-compiled BPL files - dclIndyCoreX0.bpl and dclIndyProtocolsX0.bpl - from the IDE via the "Components > Install Packages" dialog. Then delete all of the existing binaries (IndySystemX0., IndyCoreX0., IndyProtocolsX0., dclIndyCoreX0., and dclIndyProtocolsX0.*) as well as delete any Indy 10 source files, if present. Be sure to check for files in the IDE's \bin, \lib, and \source folders, \Indy subfolders, and OS system folders."

DelphiXE4 64-bit VCL Platform Growing Pains - How to set 64-bit paths?

I recently upgraded from Delphi 2010 to Delphi XE4, but the paths to the source files on one application I am working on are not found by the compiler. I go to Tools-Project-Options and select the Platform as 64-bit Windows and add the paths to the source files to the Library path. I close the dialog and try to compile but the paths are not found. I reopen project options and find that it has reset itself to 32-bit windows.
What is causing the dialog to not set the paths and revert to 32-Bit Windows?
The some files are found, but some are not. The files that are not found are the 64-bit Abbrevia
files and the 32-bit Abbrevia files.
I have successfully created other 64-bit apps without this problem, so I an confused as to what is going on.

Default Library Path

Prior to my problem, I attempted to install a component which required me to change my Library - Win32 library path. The installation did not work out so I left it. A few days ago, I ran Delphi to work on my project. I compiled the program but Delphi told me "Unit not found: 'Systems.pas' or binary equivalents (.dcu) so I changed the Library path to: C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\lib. I was then able to compile my program but when I clicked a button, none of the code ran!
I went back to check my syntax and everything was correct hence why I was able to compile my program (note: my code and program was left untouched for weeks). I then tried to re-install Delphi (2 times) expecting that the Library Path would fix, but it didn't.
After the failed attempts of trying to restore default settings I did some researched on stackoverflow but I could still not find the answer. Topics I've come across:
Delphi XE : Lost Library path
Delphi can't find System.dcu; what should the default path settings be?
I added the ShowMessage function to test if it worked and it did so I really have no clue what the problem is. However I am still suspecting that my Library Path is incorrect.
What do you guys think the problem could be?
my code
or my IDE library path
Note: current library path = C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\lib
Also, how can I fix this problem?
I guess the linked answer should solve you problem. If you need specific data for Delphi 2010, here is the registry file for 64-bit Windows (for 32-bit Windows the registry branch should be [HKEY_LOCAL_MACHINE\SOFTWARE\CodeGear\BDS\7.0\Library]):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\CodeGear\BDS\7.0\Library]
"Browsing Path"="$(BDS)\\SOURCE\\WIN32\\VCL;$(BDS)\\source\\Win32\\rtl\\common;$(BDS)\\SOURCE\\WIN32\\RTL\\SYS;$(BDS)\\source\\Win32\\rtl\\win;$(BDS)\\SOURCE\\WIN32\\WEBSNAP;$(BDS)\\source\\ToolsAPI;$(BDS)\\SOURCE\\WIN32\\IBX;$(BDS)\\source\\Win32\\Internet;$(BDS)\\SOURCE\\WIN32\\PROPERTY EDITORS;$(BDS)\\source\\Win32\\soap;$(BDS)\\SOURCE\\WIN32\\XML;$(BDS)\\source\\Win32\\db;$(BDS)\\source\\Indy\\Indy10\\Core;$(BDS)\\source\\Indy\\Indy10\\System;$(BDS)\\source\\Indy\\Indy10\\Protocols;$(BDS)\\source\\database;"
"Debug DCU Path"="$(BDS)\\lib\\Debug;$(BDS)\\Lib\\Debug\\Indy10;$(BDS)\\RaveReports\\Lib"
"Language Library Path"="$(BDS)\\lib\\$(LANGDIR);(BDS)\\lib\\$(LANGDIR)\\Indy10"
"Package DCP Output"="$(BDSCOMMONDIR)\\Dcp"
"Package DPL Output"="$(BDSCOMMONDIR)\\Bpl"
"Package Search Path"="$(BDSCOMMONDIR)\\Bpl"
"Translated Debug Library Path"="$(BDS)\\lib\\$(LANGDIR)\\Debug"
"Translated Library Path"="$(BDS)\\lib\\$(LANGDIR)"
"Translated Resource Path"="$(BDS)\\lib\\$(LANGDIR)"
"Search Path"="$(BDS)\\lib;$(BDSUSERDIR)\\Imports;$(BDS)\\Imports;$(BDS)\\Lib\\Indy10;$(BDSCOMMONDIR)\\Dcp;$(BDS)\\include;$(BDS)\\RaveReports\\Lib"
If plain import of the above registry file does not help:
Reboot and try again;
If the problem persists, delete
Software\CodeGear\BDS\7.0 branches from both
HKEY_CURRENT_USER\ and HKEY_LOCAL_MACHINE\ hives and reinstall
Delphi;
Never run automatic installation procedure for unknown
component packages on your working system.

Problem with "Include file search path" in Delphi 2010

I've installed Delphi 2010 and Quick report 2010 recently. the problem is finding DCU files of the quick report packages when i'm trying to compile the project although the path of the installed package of Quick Report has been added to "Include file search path" of resource compile.
How i can specify the path of installed packages in new version of Delphi when that doesn't work?
Make sure that the path is already present in the compiler search path (not resource compiler!) for the project or the library path of the IDE.
In Delphi 2010:
Go to Options | Environment Options | Delphi Options | Library - Win32
And add DCU or PAS files path of QuickReport to "Library Path".

Resources