Note that the below solution works for any project raising the W1029 warning (not just from projects using Delphi Mocks) like
[dcc32 Warning] W1029 Duplicate constructor 'ClassName.ConstructorName' with identical parameters will be inacessible from C++
From my original text at [WayBack] Get rid of W1029 warning in Delphi compile mode · Issue #106 · VSoftTechnologies/Delphi-Mocks · GitHub:
By default the compiler will emit warnings like these for projects when using either of the Delphi.Mocks.Behavior
or Delphi.Mocks.Expectation
directly or indirectly:
[dcc32 Warning] W1029 Duplicate constructor 'TExpectation.CreateOnceWhen' with identical parameters will be inacessible from C++
They’re harmless as DUnitX doesn’t support C++. This particular warning type cannot be disabled on the unit or source line level which means you have to disable it on the project level by either:
- adding
{$WARN DUPLICATE_CTOR_DTOR OFF}
anywhere to your .dpr
project file
- modifying the the Project Options for your project (easiest is in the
All configurations - All platforms
target):
- follow the path
Delphi Compiler
, Hints and Warnings
in the treeview on the left
- expand the
Output warnings
node in the listview on the right
- set
Duplicate constructor/destructor with identical parameters will be inacessible from C++
to Error
A screenshot of the second option is below.
Note that the spelling mistake in Duplicate constructor/destructor with identical parameters will be inacessible from C++
is how it is in the IDE, but that as Google search string it will give limited results, so here are some back-ground references:

Read the rest of this entry »
Like this:
Like Loading...