I had a Fatal error Illegal macro definition in command line or defines page.
thrown by BRCC32.exe in one of my Delphi projects.
As cgrc.exe could build the .rc file [source in Russian; WayBack], I reproduced it from the console with an Empty.rc
file that has no content. That way I could rule out file content: now it had to be command-line arguments which is a different cause than any of the search results I found before.
My project was based on one of the DUnitX test projects. It ran in Delphi XE8, but the Delphi version doesn’t matter as BRCC32 hasn’t been updated since 1999.
Further below are the failure/success examples; this went wrong:
- DUnitX uses the
DUNITX-DEBUG
define to enable debugging of DUnitX itself inDUnitX.inc
which also supports theDUNITXDEBUG
define in the same area. - Delphi will translate a .RC file in a project into a BRCC32.exe call adding the project conditional defines and search paths
- BRCC32.exe doesn’t like hyphens in conditional defines throwing a non-descriptive error
Fatal error Illegal macro definition in command line or defines page.
So either removing DUNITX-DEBUG
or changing it into DUNITXDEBUG
solves the problem. Hence my pull-request.