Why do I get "unresolved external symbol" error only when I compile with "releas" mod

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amievil
    New Member
    • Apr 2007
    • 8

    Why do I get "unresolved external symbol" error only when I compile with "releas" mod

    Hello.

    I'm devloping MFC program and found something weird happening.

    When I compile it with "debug mode", it compile fine, and runs fine.
    however, when I compile with "release mode",
    I get a bunch of "unresolved external symbol _imp_FtpFindFir stFileA@20..... ..blah blah." errors.

    Can someone explain why this is happening and how to fix it?
    Thank you.
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    HI,
    Have u used any #ifdef specific for DEBUG in your code...check that.
    Thanks
    Raghuram

    Comment

    • xoinki
      New Member
      • Apr 2007
      • 110

      #3
      Linker errors are hard to debug..
      It may be because of these reasons..
      for eg.. U have a prototype of a funtion in a header file and this function does not have a definition..
      sometimes rebuilding the solution solves the problem..

      Xoinki

      Comment

      • xoinki
        New Member
        • Apr 2007
        • 110

        #4
        Also memory module used by VC++ compiler in debug and release mode are different my guess is.. even the linker module may be different.. maybe thats the reason u get errors only in Release mode..
        check for definition prototype mismatch.. especially if u have functions which accepts objects as parameters.. sometimes VC++ compiler doesnt give any error..

        Xoinki

        Comment

        • weaknessforcats
          Recognized Expert Expert
          • Mar 2007
          • 9214

          #5
          Are you using the MFC release libraries when you release build?

          Comment

          • arunmib
            New Member
            • May 2007
            • 104

            #6
            A simple doubt, have you included the required libraries for RELEASE mode also. It must have slipped your sight...

            Comment

            • amievil
              New Member
              • Apr 2007
              • 8

              #7
              thank you for the replies.

              I think it is not definition prototype mismatch problem. double checked.


              Can you use different libraries in the realse mode and debug mode?
              I just pressed Ctrl+F5 when I build.

              I'm using MS visualstudio .net 2003.

              Thanx

              Comment

              • weaknessforcats
                Recognized Expert Expert
                • Mar 2007
                • 9214

                #8
                You do use different libraries in release mode than debuig mode. They ghave different names. Debug libraries have embedded code to operate the Visual Studio debugger. Release libraries do not have this code.

                If you are using the wrong libraries, the effect you will see is that functions apopear to be missing.

                Comment

                • amievil
                  New Member
                  • Apr 2007
                  • 8

                  #9
                  Thank you for your replies.

                  oh..
                  Can you tell me how I can find out which mode uses which library?


                  Thank you.

                  Comment

                  Working...