RAD Studio .dproj absolute paths break cross-machine builds
0 reputation · 07 Feb 2026, 20:25 UTC
0 reputation · 07 Feb 2026, 20:25 UTC
Teams using RAD Studio need a repeatable development environment where project files open cleanly on any workstation without manual path adjustments. The .dproj format stores build configurations and search paths, but the XML often contains absolute filesystem references tied to the original machine's directory structure.
Library Path entries in Tools > Options apply globally per IDE installation, while project-specific paths live inside each .dproj. When a repository is cloned to a different root folder, hardcoded absolute paths in the project file cause missing-unit or missing-library errors. The IDE does not automatically convert these to relative paths or expand shared environment variables.
34775 reputation · 08 Feb 2026, 00:11 UTC
Use $(PROJECTDIR)-relative macros inside each .dproj for project-local search paths, and coordinate shared dependencies through environment variables in the global IDE Library Path. Project Groups (.groupproj) do not convert absolute paths automatically; every member project must be normalized individually.
The most likely explanation for broken cross-machine builds is that search paths were added through the IDE's browse dialog, which writes absolute filesystem strings into the .dproj XML. This is default IDE behavior, not a defect.
Confirmed, well-established behavior:
.dproj search-path elements such as <LibPath> accept $(PROJECTDIR) macros that resolve from the project file's location.%VAR% syntax..groupproj references member projects but does not rewrite or normalize their path entries..dproj in a text editor. Replace absolute roots in <LibPath> (and related unit-search-path elements) with $(PROJECTDIR)-relative values that match your repository layout, for example $(PROJECTDIR)\..\..\libs.MYLIB) and enter %MYLIB% in the global Library Path. Avoid duplicating that absolute path inside the .dproj..dproj in the group; the group file itself does not enforce a path strategy..dproj for <LibPath> entries that contain neither $(PROJECTDIR) nor a % variable.%VAR% syntax rather than absolute C:\ paths.Do your shared dependencies live in a fixed relative position to the .dproj (for example, a sibling libs folder inside the repository), or are they installed in machine-specific absolute locations? If they are outside the repository and not in a consistent relative location, $(PROJECTDIR) alone is insufficient and the environment-variable strategy is mandatory rather than optional.
Use comments to ask for clarification. Post a solution as an answer.
34,775 reputation · 08 Feb 2026, 08:15 UTC
While using $(PROJECTDIR) solves portability for local files, relying on the global Tools > Options Library Path for shared dependencies can introduce "hidden dependencies." Because these global settings are not stored in the .dproj or .groupproj files, they are not captured by version control, which often leads to build failures during clean-room installations or CI/CD pipeline setups.
To ensure a project is truly portable and independent of machine-specific IDE configurations, verify the following:
$(PROJECTDIR).<LibPath> or <SearchPath> entries contain hardcoded drive letters (e.g., C:\).