eg. Error 1 error LNK2005: __encode_pointer already defined in
atlmincrt.lib(atlinit.obj) LIBCMT.lib
I haven't added any code or changed anything else. Just a clean new ATL
project and I wish to use 'Minimize CRT'.
Something obviously changed in VS2005. It seems odd that something as
simple as this is broken. How do I fix this?
Thanks
Michael
>eg. Error 1 error LNK2005: __encode_pointer already
>defined in atlmincrt.lib(atlinit.obj) LIBCMT.lib
Such an error could be caused by linking with an inappropriate run-time
library. I suggest you can try to change your project's run-time library
setting in your project property pages at first:
Configuration Properties ->C/C++ -> Code Generation -> Runtime Library type
->...
Thanks!
Best regards,
Gary Chang
Microsoft Community Support
======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng06 when prompted. Once you have entered the
secure code mmpng06, you will be able to update your profile and access the
partner newsgroups.
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
I've just tried changing the runtime from /MT to /MD (the only choice
available) but still get piles of errors. As I said, this is a new wizard
generated ATL DLL project and I've changed nothing apart from 'Minimize CRT
Use in ATL'. No code has been added.
I have quite a number of VS2003 ATL projects that I would like to upgrade.
Thanks
Michael
""Gary Chang[MSFT]"" <v-ga...@online.microsoft.com> wrote in message
news:alZqc42O...@TK2MSFTNGXA01.phx.gbl...
Michael,
I've just tried creating a new ATL project (DLL) in VS2005. It builds
fine for me with the "Mimimize CRT use in ATL" flag set or clear.
Is your installation clean? Have you tried this on another machine?
Dave
> In VS2005, if I create a new ATL dll project and then set 'Minimize
> CRT Use in ATL' to 'Yes' in Release, I get a pile of LNK2005 errors.
>
> eg. Error 1 error LNK2005: __encode_pointer already defined in
> atlmincrt.lib(atlinit.obj) LIBCMT.lib
Have you created an attribute or non-attributed project? I seem to recall
the attributed project type introduces an implicit dependency on the CRT.
--
Best regards,
Kim Gräsman
I just tried it on my laptop with the same result. Does it work ok on your
machine? The only thing I can think of is that I have WinFX extensions
installed and whether these have changed anything.
Michael
"Kim Gräsman" <k...@mvps.org> wrote in message
news:ba04ee015788f8...@news.microsoft.com...
> Non-Attributed.
Oh, good.
> I just tried it on my laptop with the same result. Does it work ok on
> your machine? The only thing I can think of is that I have WinFX
> extensions installed and whether these have changed anything.
Sorry, I don't have a machine with VS2005 handy, so I can't test it at the
moment.
I think there were some _ATL_MIN_CRT glitches in VC7.1 as well, i.e. including
certain headers introduced a CRT dependency, but I'm pretty sure a fresh
non-attributed project used to work.
I'll see if I can find the time to test on a 2005 machine tomorrow.
--
Best Regards,
Kim Gräsman
I'm losing interest but I thought I'd contribute these observations.
By the way, Michael, why do you want to minimize the CRT use? I'm interested
in what motivates people to do this...
Brian
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Brian Muth" <bm...@mvps.org> wrote in message
news:uy3ce9%23OGH...@TK2MSFTNGP11.phx.gbl...
msvcr80.dll is 572 Kb. I guess that is a bit of a hike compared with
msvcr71.dll's size of 340 Kb. In the days of dialup, I suppose this was an
issue, but nowadays I wonder about the relevance. It seems most applications
I download are of the order of many (and sometimes 10's of megabytes).
Brian
Well, I have a number of projects that were started in the early days of ATL
when it seemed like a good idea to minimize CRT use. The app was intended
for internet distribution and there was no need to use the CRT. It also had
a certain minimalist appeal. I agree it would be hard to make much of a
case for it now but I still like to write software that is no bigger and no
more complicated than it needs to be.
There is one area where it does make a difference. My msi installer uses
several custom actions packaged in dlls. With AtlMinCrt I can get these
down to 7-11kb each.
Thanks for confirming that there is a problem with the release setting and
it's not just me!
Michael
"Brian Muth" <bm...@mvps.org> wrote in message
news:uy3ce9%23OGH...@TK2MSFTNGP11.phx.gbl...
Try switching off the Enable C++ Exceptions setting - that allows a
release build to link OK for me.
Dave
Thanks
Michael
"David Lowndes" <Dav...@example.invalid> wrote in message
news:7ha802928un0j4ko8...@4ax.com...
It does get hard to not introduce use of the run-time - even
unintentionally. I suspect the situation is hard for MS to maintain as
well.
Dave
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Brian Muth" <bm...@mvps.org> wrote in message
news:OxaDDgBP...@TK2MSFTNGP11.phx.gbl...
I have already repro this problem on my side, I also check it in our
database. It appears to be a VC2005's product issue. I highly suggest you
can file a product bug to our product feedback center, our development team
may communicate with you directly directly on the issue there:
http://lab.msdn.microsoft.com/productfeedback/default.aspx
Meantime, if you need a solution to work around this problem, it is better
for you if one of our PSS support engineers could work with you. This may
need you submit a support incident in Microsoft PSS (Product Support
Service). As a MSDN subscriber, you have two free support incidents.
By the way, if the problem is confirmed by Microsoft PSS as a product
issue, PSS won't charge money. Every MSDN subscriber has two free support
incidents. You could use one of them to contact Microsoft PSS. So you don't
need to pay money yet. Surely if the issue is a product issue, you still
have two free support incidents.
For your reference, I attached steps to contact Microsoft PSS here: You can
contact Microsoft Product Support directly to discuss additional support
options you may have available, by contacting us at 1-(800)936-5800 or by
choosing one of the options listed at :
http://support.microsoft.com/common/international.aspx?rdpath=gp;en-us;offer
prophone
Thanks for your understanding!