Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. _ATL_MIN_CRT

_ATL_MIN_CRT

Scheduled Pinned Locked Moved COM
c++helpcomlearningworkspace
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SuperGeek
    wrote on last edited by
    #1

    Hello all the ATL/COM/C++ gurus!!! The little and unnoticed ATL beginner desparately needs your help. I am trying to build my project with ReleaseMinSize configuration with _ATL_MIN_CRT flag. Note that I don't have any runtime header files included, but I use #import-ed VB-based COM objects. Note that I disabled "exception handling" mechanisms and MFC support. All data types I am using are _com_ptr_t, _bstr_t, _variant_t from import-created .tlh and .tli files, plus regular C/C++ scalar types. My problem: link error 2001 with the bunch of unresolved external symbols. Does anyone know where the problem is. BIG TIME thanks to all with the BIG heart. Kirill.

    M 1 Reply Last reply
    0
    • S SuperGeek

      Hello all the ATL/COM/C++ gurus!!! The little and unnoticed ATL beginner desparately needs your help. I am trying to build my project with ReleaseMinSize configuration with _ATL_MIN_CRT flag. Note that I don't have any runtime header files included, but I use #import-ed VB-based COM objects. Note that I disabled "exception handling" mechanisms and MFC support. All data types I am using are _com_ptr_t, _bstr_t, _variant_t from import-created .tlh and .tli files, plus regular C/C++ scalar types. My problem: link error 2001 with the bunch of unresolved external symbols. Does anyone know where the problem is. BIG TIME thanks to all with the BIG heart. Kirill.

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Those xxx_t types are provided by the C runtime library (CRT). Defining _ATL_MIN_CRT means your binary doesn't link with the CRT. Since your code needs the CRT, you get an unresolved symbol. Remove the _ATL_MIN_CRT symbol to fix this. The help page on LNK2001 has more info. --Mike-- http://home.inreach.com/mdunn/ The Signature, back by popular demand: Buffy. Pajamas.

      F S 2 Replies Last reply
      0
      • M Michael Dunn

        Those xxx_t types are provided by the C runtime library (CRT). Defining _ATL_MIN_CRT means your binary doesn't link with the CRT. Since your code needs the CRT, you get an unresolved symbol. Remove the _ATL_MIN_CRT symbol to fix this. The help page on LNK2001 has more info. --Mike-- http://home.inreach.com/mdunn/ The Signature, back by popular demand: Buffy. Pajamas.

        F Offline
        F Offline
        Felix Cho
        wrote on last edited by
        #3

        If possible, you may also use raw_interfaces_only and raw_native_types with your #import directive, then subsitute _com_ptr_t, _bstr_t, _variant_t with CComPtr/CComQIPtr, CComBSTR and CComVariant.

        S 1 Reply Last reply
        0
        • M Michael Dunn

          Those xxx_t types are provided by the C runtime library (CRT). Defining _ATL_MIN_CRT means your binary doesn't link with the CRT. Since your code needs the CRT, you get an unresolved symbol. Remove the _ATL_MIN_CRT symbol to fix this. The help page on LNK2001 has more info. --Mike-- http://home.inreach.com/mdunn/ The Signature, back by popular demand: Buffy. Pajamas.

          S Offline
          S Offline
          SuperGeek
          wrote on last edited by
          #4

          Mike, thanks for an assurance!!! I knew that this issue was related to .tlh and .tli files, but could not put a period after my speculations. Kirill

          1 Reply Last reply
          0
          • F Felix Cho

            If possible, you may also use raw_interfaces_only and raw_native_types with your #import directive, then subsitute _com_ptr_t, _bstr_t, _variant_t with CComPtr/CComQIPtr, CComBSTR and CComVariant.

            S Offline
            S Offline
            SuperGeek
            wrote on last edited by
            #5

            Thanks Felix. This will definitely raise me from ATL HELL. The problem with those #import's - lack of documentation and examples. I only understood no_namespace, rename_namespace, rename and named_guids (the easiest ones). All other flags had been complete mystery. Kirill.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups