1

I have a GUI application with size about 80MB (DEBUG mode). Sometimes when I change something in the source I just want to know if it compiles ok and I hit CTRL+F9 (I don't rely on Code Insight, because it doesn't always work on large projects). The compilation completes very fast, but the linking phase takes about 10 seconds on Core i7 with Samsung 840 Pro SSD!!! Which is pretty uncomfortable...

Is there an IDE option/shortcut to tell IDE to only compile the source, without linking/generating the actual .exe? Or DCC option?

  • I'm using Delphi XE7
iPath ツ
  • 2,468
  • 20
  • 31
  • 5
    There is Project | Syntax Check, though I never personally use it. – 500 - Internal Server Error Dec 29 '14 at 21:28
  • @500-InternalServerError WOW! I never knew this option :) Please, make your comment as an answer. You're SSD saver man!!! :) – iPath ツ Dec 29 '14 at 21:53
  • I tried it with GExpert's IDE Shortcuts - just rocks :) Thanks again! – iPath ツ Dec 29 '14 at 21:54
  • I would expect the bulk of your 80MB to be resources. So you may want to consider placing them in a resource DLL. – Disillusioned Dec 30 '14 at 07:48
  • @CraigYoung no my resources there. Create FMX application, put some components like TTreeview, TMemo, Indy stuff, add REST.Client components and you end up with 40 Megs .EXE in DEBUG mode... – iPath ツ Dec 30 '14 at 10:33
  • Did this work well in XE7? I'm currently on Rio, and arrived here with the same question. It looks like 'Compile' will compile only modified units (and then link), while `Syntax check` will compile all units. With 800K lines in my project, unfortunately syntax check takes way longer than recompiling and linking just a couple of units. – GolezTrol Aug 31 '21 at 09:09
  • To make the compiling faster: Compile a without debug information. Maybe some other options (optimization, inlining) could help a bit. You could make a separate build config for this. – GolezTrol Aug 31 '21 at 10:15
  • To break the linking step, you could make it impossible for the linker to link. You can do this by locking the output file (by keeping it running outside of the IDE), but that's annoying when you actually want to debug. Another option would be to add something like `-E:NOLINK:` in Project, Options, Building->Compiling->Additional options to pass to the compiler. `-E` specifies the output path. (overrides, actually, because it's already a setting). Specifying an invalid path will make the linker fail to open the output file. – GolezTrol Aug 31 '21 at 10:24

0 Answers0