???? ??? LNK2005 ????? ??? ??? ????? CRT ????????? MFC ?? ??????? ??? ???? ?? Visual C++

???? ???????: 148652 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

???????

????? ??? ??? ????? ??? ??????? C (CRT) ??????? ??? Foundation ?? Microsoft "(MFC) ?? ??????? ??? ????, ?? ???? ???? ??????? LNK2005 ???????:
nafxcwd.lib(afxmem.obj): ??? LNK2005:
"???? ????? * __cdecl ???? ???? (??? ???? ???? ?????)" (??2@YAPAXI@Z) ??????
????? ?? LIBCMTD.lib(new.obj)
nafxcwd.lib(afxmem.obj): ??? LNK2005:
"????? __cdecl delete(void *) ???? ???????" (??3@YAXPAX@Z) ????? ??????
?? LIBCMTD.lib(dbgnew.obj)
nafxcwd.lib(afxmem.obj): ??? LNK2005:
"???? ????? * __cdecl new(unsigned int,int,char const *,int) ???? ???????"
(??2@YAPAXIHPBDH@Z) ???????? ?????? ?? LIBCMTD.lib(dbgnew.obj)
mfcs40d.lib(dllmodul.obj): ??? LNK2005: _DllMain@12 ??????? ?????? ??
MSVCRTD.LIB (dllmain.obj)
mfcs42d.lib(dllmodul.obj): ??? LNK2005: _DllMain@12 ??????? ?????? ??
msvcrtd.lib(dllmain.obj)

?????

??????? ?????? CRT ????? ??? ????? ????, ??? ? ????? DllMain. ????? ?????? MFC ????? ??? ??????? ? ????? DllMain. ????? ??? ??????? ?????? MFC ?? ??? ??? ??? ??? ????? CRT.

????

???? ??????? ??? ??? ???????. ????? ???? ????? ??? linker ??? ???????? ?? ??????? ??????. ???? ?????? ???? ?? ?????? ??? ?????? ??????? ???? ???? ??????? ???????.

?????? ????? ??????? ??????? 6.0 Visual C++.

???? ????: ??? ???? ??? ?????? ???????? ?? ??????? ??????

  1. ??? Project ??????? ? ???? ??? ???????.
  2. ?? ??? ??????? ?? ?? ???? ?????? ??????? ??????? ???? ?????? ????? ??????? ???? ??? ?????? ??? ????? ????????.
  3. ??? ????? ??????? "??????" ? ???? ?????? ??????? ?? ???? ??????? ?????? ?????.
  4. ?? ?????? ????? ?????? ????? ????? ??????? (??? ???? ??????? Nafxcwd.lib;Libcmtd.lib).

    ?????? ???? ??????? ??? ??????? /NOD: < ??? ????? >.
  5. ?? ?????? ??????? ??????? ????/????? ????? ????? ???????. ??? ?????? ?? ?? ??? ?????? ?? ????? ? ?????? ??????? ?? ????? (??? ???? ??????? Nafxcwd.lib Libcmtd.lib).
?????? ??? ?????? ?? Visual C++ .NET ????? "????? Visual C++ Project ?????" ????? ????????? ??? ????????.

???? ??????: ????? ???? ? ????? ?????? ??????? ?????

???? ????? ?????? ??????? ?????? ???? ??????? ???????:
  1. ??? Project ??????? ? ???? ??? ???????.
  2. ?? ??? ??????? ?? ?? ???? ?????? ??????? ??????? ???? ?????? ????? ??????? ???? ??? ?????? ??? ????? ????????.
  3. ?? ??????? ?????? ???? / ??????: lib ?? ?????? Project ??????.
  4. ????? ????? ???????. ???? ??? ???????? ?? ???? ??????? ????? ????? ????????.

?????

????? ??? ?????? ??? ???????.

??????? ????

??? ??????? ?????? MFC ??? ?????? ?? ??? ??? ??? ????? CRT. ????? ?????? ???? ?? ???? ?????? ?? ?? ????? ?? ??? ?? ??????? Msdev\Mfc\Include\Afx.h ????? ??? ??????? (????? # <Afx.h>) ?? ??? ????? (????? # <Stdafx.h>). ????? Afx.h ???? ????? ??????? ?????? ????????? ???????? ??????? & # pragma ??????? (lib ? "<libname>").

??? ??? ????? ?????? ????? ??? ???? .c ?? .cpp ???? ????? ???? ?? ?????? MFC ????? ????? ??? ????? ??? ???? ????? (Forcelib.h) ?? ????? ?????? ?? ?????? ???????. ???? ??? ????? ????? ?? ??? thelibrary ????? ?????.

?? ????? C++ ????? ??? ??? ????? ???. ?????? ??? ????? ???? ??????? ???????:
  1. ???? Msdev\Mfc\Include\Afx.h.
  2. ??? ???? ??? _AFX_NOFORCE_LIBS #ifndef #endif / /! _AFX_NOFORCE_LIBS.
  3. ??? ??????? ??? ????? Windows.
  4. ????? ??? ??? ????.
  5. ??? ??????? ??????? ?? ??? ????? ??????.
  6. ?? ???? ????? ???? Msdev\Mfc\Include\Forcelib.h.

????? ????? ????? ??????? ?? Visual C++ .NET

  1. ??? ????? Microsoft Visual Studio .NET.
  2. ?? ??????? ???? ??? ??? ???? ?? ???? ??? ???????.
  3. ???? ??? ?????? Visual C++ ??? ????? Project ?? ???? ??? ????? MFC ??? ?????.
  4. ?? ???? ???? ????? ? ???? Q148652.
  5. ?? ???? ???? ?????? ???? Test ??????? ??? c ??? ?? ???? ??? ?????.
  6. ?? ???? ?????? ????? ??????? MFC ???? ??? ??? ???????.
  7. ???? ??? ??????? ??? ?????? ??? ??? ??????? ?? ???? ??? ??????? MFC ?? ????? ????? ??? ??????? MFC.
  8. ???? ??? ?????.
  9. ?? "?????? ??????" ??? ????? ???? ??? ???? ??????? .cpp ???????.
  10. ???? ??? ?????? ?????? ??? ??????? ??????? ????? ?? ???? ??? ?????.
  11. ???? ??? ?????? ?????? ??? ??????? ?????? ? ??? ??? ????? ?? ???? ??? ????? ???? ????.
  12. ???? ??? ??????? C++ ??? ?????. ?? ???? ???? ????? ? ???? Aa. ???? ??? ???.
  13. ?? ???? ???????? ???????? ??????? ?? ??? Aa.cpp:
    int test(){new int; return 1;}
  14. ???? ??? ?????? ?????? ??? ??????? ?????? ? ??? ??? ????? ?? ???? ??? ????? ???? ?????.
  15. ??? ??????? ???????:
    • Q148652.cpp
    • Q148652Dlg.cpp
    • stdafx.cpp
  16. ???? ??? ???.
  17. ???? ??????? ???? ??? ???????? ?? ?????? 15 ??? ????? ??????.
  18. ??? ???? ??????? .cpp ????? ??? ???? ?????.
  19. ???? ??? ?????? ?????? ??? ????? ????? .cpp ???? ??? ??????? ??? ?? ???? ??? ?????.
  20. ?? ?????? ????? ????? ?? ?? ?????? C/C++.
  21. ???? ??? Precompiled ??????.
  22. ????? ??? Precompiled ?????/??????? ????? ??? ??????? Precompiled ??????. ???? ??? ?????.
  23. ?? ??????? ????? ? ???? ??? ????? ??????? ????.

???????

???? ???????: 148652 - ????? ??? ??????: 05/???? ?????/1429 - ??????: 7.1
????? ???
  • Microsoft Visual C++ 2008 Express Edition
  • Microsoft Visual C++ 4.0 Standard Edition
  • Microsoft Visual C++ 4.1 Subscription
  • Microsoft Visual C++ 5.0 Enterprise Edition
  • Microsoft Visual C++ 6.0 Enterprise Edition
  • Microsoft Visual C++ 5.0 Professional Edition
  • Microsoft Visual C++ 6.0 Professional Edition
  • Microsoft Visual C++, 32-bit Learning Edition 6.0
  • Microsoft Visual C++ .NET 2002 Standard Edition
  • Microsoft Visual C++ .NET 2003 Standard Edition
????? ??????: 
kbmt kbsweptvs2008 kbtshoot kbarttypeinf kberrmsg kbprb KB148652 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????148652

????? ???????