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. C / C++ / MFC
  4. Linker error LNK2001 ("external symbol not found")

Linker error LNK2001 ("external symbol not found")

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiohelpquestion
16 Posts 2 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.
  • L Lost User

    I can only assume it is something to do with using ATL or your project settings. I coded a very simple program that made a call to _recalloc() and it found it in the standard MSVCRT100 library without me having to add anything to the project's properties.

    One of these days I'm going to think of a really clever signature.

    T Offline
    T Offline
    tiwal
    wrote on last edited by
    #7

    i tried to change the settings in every possible configuration, playing with the Atl and Mfc use switches ... all I could get is different methods involved, but always errors LNK2001 and LNK2019, always from methods relating to Atl. This smells like an environment flaw ....

    L 1 Reply Last reply
    0
    • T tiwal

      i tried to change the settings in every possible configuration, playing with the Atl and Mfc use switches ... all I could get is different methods involved, but always errors LNK2001 and LNK2019, always from methods relating to Atl. This smells like an environment flaw ....

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #8

      The only thing I can suggest is to try creating a new project and seeing if that builds successfully.

      One of these days I'm going to think of a really clever signature.

      T 1 Reply Last reply
      0
      • L Lost User

        The only thing I can suggest is to try creating a new project and seeing if that builds successfully.

        One of these days I'm going to think of a really clever signature.

        T Offline
        T Offline
        tiwal
        wrote on last edited by
        #9

        I set up a minimal application which just uses CA2WEX,, and I kept getting the same errors. Then, I eliminated the CA2WEX and substituted that with an explicit LPWSTR variable .. this, as I expected, eliminated all the Atl errors. What I didn't expect though (well, almost..) was another error: "internale Error during IncrBuildImage" (LNK1000). After that, a popup appeared stating that the linker had stopped working .... this sounds quite hilarious to me .... :)))

        L 1 Reply Last reply
        0
        • T tiwal

          I set up a minimal application which just uses CA2WEX,, and I kept getting the same errors. Then, I eliminated the CA2WEX and substituted that with an explicit LPWSTR variable .. this, as I expected, eliminated all the Atl errors. What I didn't expect though (well, almost..) was another error: "internale Error during IncrBuildImage" (LNK1000). After that, a popup appeared stating that the linker had stopped working .... this sounds quite hilarious to me .... :)))

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #10

          Sorry, but I have no real idea of what is going on, and cannot understand what it is about your VS setup that is causing the problems.

          One of these days I'm going to think of a really clever signature.

          T 1 Reply Last reply
          0
          • L Lost User

            Sorry, but I have no real idea of what is going on, and cannot understand what it is about your VS setup that is causing the problems.

            One of these days I'm going to think of a really clever signature.

            T Offline
            T Offline
            tiwal
            wrote on last edited by
            #11

            A couple of seconds ago, I just eliminated the "atlsd.lib" library from the Additional Dependencies ... though I have a "ImageList_Create()" call that, according to MSDN, requires the library "ImgCtl.lib", this library doesn't seem to be anywhere. So I just added "comctl32.lib", and everything linked correctly . Please don't ask me why, since I did the same thing at the beginning and it didn't work ... I just ask myself if I can really trust this environment..... Thank you anyway for the support.

            L 1 Reply Last reply
            0
            • T tiwal

              A couple of seconds ago, I just eliminated the "atlsd.lib" library from the Additional Dependencies ... though I have a "ImageList_Create()" call that, according to MSDN, requires the library "ImgCtl.lib", this library doesn't seem to be anywhere. So I just added "comctl32.lib", and everything linked correctly . Please don't ask me why, since I did the same thing at the beginning and it didn't work ... I just ask myself if I can really trust this environment..... Thank you anyway for the support.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #12

              The environment is fine, but you seem to be using some strange libraries. For example, look at the documentation for ImageList_Create()[^], there is no mention of ImgCtl.lib; what documentation are you working from?

              One of these days I'm going to think of a really clever signature.

              T 1 Reply Last reply
              0
              • L Lost User

                The environment is fine, but you seem to be using some strange libraries. For example, look at the documentation for ImageList_Create()[^], there is no mention of ImgCtl.lib; what documentation are you working from?

                One of these days I'm going to think of a really clever signature.

                T Offline
                T Offline
                tiwal
                wrote on last edited by
                #13

                I am using MSDN for VS 2008 ... actually when looking at ImageList_create(), I didn't realize I was reading the Windows CE 5.0 documentation, which includes "ImgClt.lib". Just trying I realized comctl32.lib is enough. Anyway the real problem seems to have been my inclusion of atlsd.lib, which I did when I realized the _recalloc() couldn't be linked. I don't know what changed but now it seems to be ok ... anyway I keep having serious doubts about the reliability of the environment , since more than once , building twice the same application without making any change between builds, I got different and contrasting results ...

                L 1 Reply Last reply
                0
                • T tiwal

                  I am using MSDN for VS 2008 ... actually when looking at ImageList_create(), I didn't realize I was reading the Windows CE 5.0 documentation, which includes "ImgClt.lib". Just trying I realized comctl32.lib is enough. Anyway the real problem seems to have been my inclusion of atlsd.lib, which I did when I realized the _recalloc() couldn't be linked. I don't know what changed but now it seems to be ok ... anyway I keep having serious doubts about the reliability of the environment , since more than once , building twice the same application without making any change between builds, I got different and contrasting results ...

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #14

                  There are probably millions of people around the world using Visual Studio to build their applications. If there was such a fundamental flaw in it then I think it would have been brought to Microsoft's attention by now. I have used the express versions (2005, 2008 and 2010) and never come across anything even vaguely resembling your problem. But if you are trying to include CE libraries into a standard desktop application it's little wonder that things are looking strange.

                  One of these days I'm going to think of a really clever signature.

                  T 1 Reply Last reply
                  0
                  • L Lost User

                    There are probably millions of people around the world using Visual Studio to build their applications. If there was such a fundamental flaw in it then I think it would have been brought to Microsoft's attention by now. I have used the express versions (2005, 2008 and 2010) and never come across anything even vaguely resembling your problem. But if you are trying to include CE libraries into a standard desktop application it's little wonder that things are looking strange.

                    One of these days I'm going to think of a really clever signature.

                    T Offline
                    T Offline
                    tiwal
                    wrote on last edited by
                    #15

                    Well I agree with you .... even though , there are tons of people who see such strange things and never report to Microsoft ... and most of them don't even dare thinking there's a problem ... :) .... Anyway , I don't think what I saw, that is , those two differents results with two builds of the same version, can be caused by any programmer's error....

                    L 1 Reply Last reply
                    0
                    • T tiwal

                      Well I agree with you .... even though , there are tons of people who see such strange things and never report to Microsoft ... and most of them don't even dare thinking there's a problem ... :) .... Anyway , I don't think what I saw, that is , those two differents results with two builds of the same version, can be caused by any programmer's error....

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #16

                      tiwal wrote:

                      I don't think what I saw, that is , those two differents results with two builds of the same version, can be caused by any programmer's error

                      Don't you believe it. I've had many more 'strange' problems that were caused by me, than were caused by Visual Studio.

                      One of these days I'm going to think of a really clever signature.

                      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