D2007: discrepancies between "building" and "compiling"

I'm running RAD Studio 2007.  Until recently, I was unaware of any difference between "building" (Shift+F9) and "compiling" (Ctrl+F9), other than the nature of recompiling everything when you build, instead of some things.

However, after some recent changes to some of our unit test code by a contractor, I now find that "building" the unit tests results in an executable that always runs in GUI mode, regardless of the project settings.  "compiling" yields an executable that behaves as expected, honoring the CONSOLE_TESTRUNNER flag, when set.

Any ideas?  What are the circumstances that can cause "building" to yield a different executable from "compiling", in terms of functionality?  Heck, I expected them to be bit for bit compatible.

Thanks.

J.
0
John
10/29/2008 1:32:26 AM
embarcadero.delphi.general 4258 articles. 0 followers. Follow

3 Replies
907 Views

Similar Articles

[PageSpeed] 57
Get it on Google Play
Get it on Apple App Store

John Whitla wrote:
> I'm running RAD Studio 2007.  Until recently, I was unaware of any
> difference between "building" (Shift+F9) and "compiling" (Ctrl+F9),
> other than the nature of recompiling everything when you build,
> instead of some things.
> 
> However, after some recent changes to some of our unit test code by a
> contractor, I now find that "building" the unit tests results in an
> executable that always runs in GUI mode, regardless of the project
> settings.  "compiling" yields an executable that behaves as expected,
> honoring the CONSOLE_TESTRUNNER flag, when set.
> 
> Any ideas?  What are the circumstances that can cause "building" to
> yield a different executable from "compiling", in terms of
> functionality?  Heck, I expected them to be bit for bit compatible.

The $APPTYPE compiler directive sets the application type to console or 
gui, but if the unit that compiler directive appears in is not compiled, 
then it might not have any effect.

You should use your source-control system to show you what changes your 
contractor made; maybe he or she added the $APPTYPE directive somewhere.

-- 
Rob
0
Rob
10/29/2008 2:32:34 AM
> {quote:title=Rob Kennedy wrote:}
> 
> The $APPTYPE compiler directive sets the application type to console or 
> gui, but if the unit that compiler directive appears in is not compiled, 
> then it might not have any effect.

Thank you!  This appears to be the cause.

> You should use your source-control system to show you what changes your 
> contractor made; maybe he or she added the $APPTYPE directive somewhere.

That was the plan, but with over sixty files I had to go through, I was hoping to have something specific, such as $APPTYPE, to look for in the differences.


On another note, I don't suppose you can tell me, off-hand, what the magic key sequence is that will result in all the compiler directives being dumped at the start of a particular file?  I'd read about (and played with) this feature in days-gone-by, but can't remember the keystrokes.

I need to dig up that sequence, so that I can let the contractors know what I don't want them doing any more. :)

Thanks again.

J.
0
John
10/29/2008 9:47:42 PM
{quote:title=John Whitla wrote:}{quote}
> On another note, I don't suppose you can tell me, off-hand, what the magic key sequence is that will result in all the compiler directives being dumped at the start of a particular file?  I'd read about (and played with) this feature in days-gone-by, but can't remember the keystrokes.


Never mind, I found it: Ctrl + O O
0
John
10/29/2008 10:22:52 PM
Reply: