_ATL_MIN_CRT results in unbuildable code 
Author Message
 _ATL_MIN_CRT results in unbuildable code

We've been trying to port a VC6 ATL project into VC7 and have run into
an issue with our Release builds.  We have _ATL_MIN_CRT defined for
the Release build and everything built just fine in VC6, however in
VC7 we're getting unresolved externals for new(), delete(), and
__purecall without any modifications to the code.

After trying to puzzle this out for a while, I decided to try out a
quick and easy test app and created a new C++ ATL project in VC7.  I
then turned on the "minimize CRT use in ATL" option for the Release
build (it's now off by default) and added a simple ATL object from the
Solution Explorer.

This code would not build!  To be perfectly clear, I had not written
any code at all myself, this project only had code generated by the
VC7 wizards.  The only modification I had made was changing one
option, and it was unable to build with an unresolved external for
_main().  So something in the wizard code introduces a dependency on
the CRT startup code.

It looks to me like VC7 has some serious issues with the _ATL_MIN_CRT
setting.  Anyone have any experience with this or work-arounds?

Tony Perkins



Sat, 08 Jan 2005 23:17:02 GMT  
 _ATL_MIN_CRT results in unbuildable code
In the .NET help system:
help://MS.VSCC/MS.MSDNVS/vccore/html/vcconrecognizingfunctionsthatrelyoncrts
tartupcode.htm

It says that memory allocation functions require CRT startup code.  Seems a
little different to me from VC6.  My workaround, though, is to not use
ATL_MIN_CRT  ;)

-Dale


Quote:
> We've been trying to port a VC6 ATL project into VC7 and have run into
> an issue with our Release builds.  We have _ATL_MIN_CRT defined for
> the Release build and everything built just fine in VC6, however in
> VC7 we're getting unresolved externals for new(), delete(), and
> __purecall without any modifications to the code.

> After trying to puzzle this out for a while, I decided to try out a
> quick and easy test app and created a new C++ ATL project in VC7.  I
> then turned on the "minimize CRT use in ATL" option for the Release
> build (it's now off by default) and added a simple ATL object from the
> Solution Explorer.

> This code would not build!  To be perfectly clear, I had not written
> any code at all myself, this project only had code generated by the
> VC7 wizards.  The only modification I had made was changing one
> option, and it was unable to build with an unresolved external for
> _main().  So something in the wizard code introduces a dependency on
> the CRT startup code.

> It looks to me like VC7 has some serious issues with the _ATL_MIN_CRT
> setting.  Anyone have any experience with this or work-arounds?

> Tony Perkins



Mon, 10 Jan 2005 01:30:30 GMT  
 _ATL_MIN_CRT results in unbuildable code
Thanks, Dale, it looks like VC7 and ATL_MIN_CRT just won't play well
together.

It still sort of ticks me off that VC7's wizards can generate code
that won't compile.

Tony

On Wed, 24 Jul 2002 11:30:30 -0600, "Dale Lamb"

Quote:

>In the .NET help system:
>help://MS.VSCC/MS.MSDNVS/vccore/html/vcconrecognizingfunctionsthatrelyoncrts
>tartupcode.htm

>It says that memory allocation functions require CRT startup code.  Seems a
>little different to me from VC6.  My workaround, though, is to not use
>ATL_MIN_CRT  ;)

>-Dale



Mon, 10 Jan 2005 21:53:22 GMT  
 _ATL_MIN_CRT results in unbuildable code

Quote:
> Thanks, Dale, it looks like VC7 and ATL_MIN_CRT just won't play well
> together.

> It still sort of ticks me off that VC7's wizards can generate code
> that won't compile.

That's certainly not limited to VC7, either.  I just encountered a problem
yesterday in VC++ 6.0 where the wizard added the declaration for a method in
the middle of a private structure definition within the class definition.

Sorta puts the "Do not meddle in the affairs of wizards ..." comment in an
interesting light.



Tue, 11 Jan 2005 00:57:49 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Attributed code and _ATL_MIN_CRT

2. VC++ survey results at Code Project

3. International Obfuscated C Code Contest Results for 1988 (1 of 6)

4. Whither obfuscated C code results?

5. Weird Results with this code :(

6. Weird Results with this code

7. Extending HRESULT for my own result codes

8. Need HAYES MODEM Result Codes!

9. CAsyncSocket resulting in ugly code

10. Survey results [Re: Code Coverage Tools (C0, C1, S1)]

11. I get strange results from this C code

12. How to get the JIT result native code of IL

 

 
Powered by phpBB® Forum Software