IDE expects file to be in another place

I have a component package in Delphi XE2 version 16.0.4429.46931, both the runtime package and the development time. This package has been around for over a year, and the file / folder structure has always been the same. I save all units in the selected Source folder from the root and the actual packages in the Packages folder in the same root directory. Thus, the packages are in \Root\Packages\ , and the units are in \Root\Source\ .

Today, after creating the runtime package, I looked at the prompts and warnings. One of the warnings:

 [DCC Warning] Inno.TimeChart.pas(1): W1025 Unsupported language feature: 'class constructor' 

Self-warning is not what bothers me. The problem is that when I double-click this warning, I get an error message from the IDE:

IDE Error Message

The only thing I noticed right away is that it does not look in the Source folder, but rather in the Packages folder. Somehow, the IDE expects the device to be in the same place as the packet. Since I created the package over a year ago, I have never changed any of the library paths, file locations or package structure.

The file exists, but in a different place than it seems. The file was never saved in the projects folder, and in fact, nothing but the package projects themselves was ever saved in the Packages folder. All this is in the Source folder, but the IDE seems to be thinking differently.

Why does the IDE think this file is in a different folder? All other hints and warnings related to the same device work very well when I double-clicked them, but not this one.

EDIT

I created a new test suite to fix this problem.

 Root\TestPackage.dpr Root\Source\TestPackageUnit.pas 

The specific code fragment causing this compiler warning is in this class:

 type TMyComponent = class(TComponent) strict private class constructor Create; end; 

When I compile using Process Monitor, I see that the IDE searches in 30 or more different places for this file (of course, it doesn’t work), it looks like it looks in every library path, and not in one place that the package says it's on.

Things i tried

  • Checked, there is no difference between these paths between DPR and DPROJ
  • Installed all the latest updates and IDE FixPack (actually gave me new problems)
  • Monitoring file access with Process Monitor
    • Filters: the process name is BDS.exe ; The path ends with TestPackageUnit.pas
    • Result: "NAME NOT FOUND" β†’ "Desired access: general view of reading": "Open parameters": "Synchronize IO", "Without warning", "Non-catalytic" file attributes: N ShareMode: "Read", "Write AllocationSize: n / a
  • Performed using only development time, run time, and development time / run time
  • Tried with registered and unregistered component
  • Tried with the directory in the library path, not the library path
  • Removed about 20 unnecessary entries from the library path to make it shorter
  • The moved directory to the beginning of the library path
  • Checked that there is no DOF file associated with the project (I think this from older versions)
  • Restarting the IDE and the number of times per computer
  • Purified compiled and temporary files from the project, including BPL and DCU files
  • Modified strict private only private and even public
+4
source share
3 answers

I encounter such problems when the list of delphi search paths is too long. I could always help myself in moving the corresponding directories to the foreground, that is, on the list.

+3
source

Make sure the file has not been added to the project file (dpr or dpk). Project - View Source will display the file.

If this is not the case, try to find all the files in the project for the file name and see what happens.

+1
source

Found it on another site:

There is another QC that is probably related to your problem. http://qc.embarcadero.com/wc/qcmain.aspx?d=87693

Go to "Project Settings" β†’ "Delphi Compiler" β†’ "C / C ++ Output" and Generating C / C ++ Output File Select Generate DCU.

Dahlia Prasnar

Source: http://codeverge.com/embarcadero.delphi.general

+1
source

All Articles