Help: Error when compile WTL app with /GR

Help
dao long
2006-02-16
2013-05-13
  • dao long

    dao long - 2006-02-16

    /GR
    -> error:
    Linking...
    LIBCMT.lib(crt0dat.obj) : error LNK2005: __osplatform already defined in atlmincrt.lib(atlinit.obj)
    LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup
    Release/testWtl.exe : fatal error LNK1120: 1 unresolved externals

     
    • dao long

      dao long - 2006-02-16

      Linking...
      MSVCRT.lib(MSVCR71.dll) : error LNK2005: _free already defined in atlmincrt.lib(atlinit.obj)
      MSVCRT.lib(MSVCR71.dll) : error LNK2005: _realloc already defined in atlmincrt.lib(atlinit.obj)
      MSVCRT.lib(MSVCR71.dll) : error LNK2005: _malloc already defined in atlmincrt.lib(atlinit.obj)
      atlmincrt.lib(atlinit.obj) : error LNK2001: unresolved external symbol ___xt_z
      atlmincrt.lib(atlinit.obj) : error LNK2001: unresolved external symbol ___xt_a
      atlmincrt.lib(atlinit.obj) : error LNK2001: unresolved external symbol ___xp_z
      atlmincrt.lib(atlinit.obj) : error LNK2001: unresolved external symbol ___xp_a
      Release/testWtl.exe : fatal error LNK1120: 4 unresolved externals

       
    • Igor Tandetnik

      Igor Tandetnik - 2006-02-16

      You are building with MinCRT, but you are using CRT functions.

      If you are using VC6, go to Project | Settings | C/C++ | Preprocessor Definitions and remove _ATL_MIN_CRT macro.

      If you are using VC7 and up, go to Project | Properties | General | Minimize CRT Use in ATL and set it to No.

       
    • dao long

      dao long - 2006-02-17

      thank you very much!

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks