According to Chris Hesik, here:

According to Chris Hesik, here:

http://stackoverflow.com/questions/731799/how-can-i-find-all-the-units-in-my-delphi-app

The --depends option is supposed to work with the Delphi compiler, and it outputs a .d file. Does it still work in Berlin, and where is the file supposed to be output to?

Comments

  1. Work in progress: batch file that parses the .MAP file to see which units actually made it into your .EXE (i.e. not eliminated by the linker).
    https://gist.github.com/jpluimers/bc35a0448ba63d76de4ba2b61e8be0e4

    ReplyDelete
  2. Works for me with Berlin dcc32 and dcc64. E.g. "dcc32 --depends hello.dpr" produces hello.d in current directory.

    ReplyDelete
  3. It still works in 10.1 Berlin, but only with the command line compiler. In the IDE it does not work whatever you do (use "[x] Output unit dependency information" or pass "--depends" via "Additional options to pass to the compiler").

    Well I have reported this more than five years ago http://qc.embarcadero.com/wc/qcmain.aspx?d=93897

    ReplyDelete
  4. I wonder how to pass this via msbuild to dcc*.exe.

    ReplyDelete
  5. Uwe Schuster Thanks; that explains my issue..

    ReplyDelete
  6. Jeroen Wiert Pluimers msbuild hello.dproj /property:DCC_OutputDependencies=true

    ReplyDelete
  7. Uwe Schuster It does work though if you check "use MSBuild externally"

    ReplyDelete
  8. The msbuild property setting is available in at least Delphi/C++Builder versions 2007 and 2010..Berlin as it is in CodeGear.Cpp.Targets and CodeGear.Delphi.Targets/RTL.Build.targets for BDS versions 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 and 18. It might be available in versions 2005/2006/2009 as well but I don't have these lying around any more.

    ReplyDelete

Post a Comment