Re: commit: reduce compile time dependencies


Subject: Re: commit: reduce compile time dependencies
From: Mike Nordell (tamlin@algonet.se)
Date: Tue Mar 20 2001 - 00:27:44 CST


Paul Rohr wrote:
> I'm getting a build failure (NT4, VC5, makefiles) with this change, as
> follows:
>
> -- snip --
> ap_Win32App.cpp
> c:\devstudio\vc\include\stdlib.h(421)
> second C linkage of overloaded function
> '_calloc_dbg' not allowed
[...]

> If I comment out the WIN32_LEAN_AND_MEAN, it works just fine
[...]

> Here's what's stumping me -- from looking at my local copy of windows.h, I
> can't see how that #define should be affecting the include order.

If you compile that file with /P (preprecess to file) both with and without
the macro defined and the use e.g. windiff to compare them it might give you
an answer, but I dubt it's worth the effort (if you do, you might also try
the /Bt compiler flag to display compile times).

> More to
> the point, why does this work for you and not for me?

VC5/VC6 header file differences, or the fact I'm using M$' version of
precompiled headers.
I just recalled I had that error in an earlier project, and found the
following comment:

// <stdlib.h> NEEDS to be included before <crtdbg.h> to not get
// compiler-errors!

I think this implies it has to go before <windows.h> also. If that works,
please leave the macro and just add <stdlib.h> to the beginning.

/Mike



This archive was generated by hypermail 2b25 : Tue Mar 20 2001 - 01:01:53 CST