[VC++] Using libraries

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

    [VC++] Using libraries

    Hello.
    I'm using MS Visual Studio .NET 2003.

    I learned that it uses different libraries
    when it compiles at "debug mode" and "release mode".

    But how do you find out which libraries are used at each mode ?
    Is it possible to change libraries used at "debug mode" and "release mode"?
    for example, if Visual Studio uses library A at "debug mode" and library B at "release mode" at the moment,
    can you change it to library B : "debug mode" and library A at "release mode" ?

    thank you
  • arunmib
    New Member
    • May 2007
    • 104

    #2
    Originally posted by amievil
    Hello.
    I'm using MS Visual Studio .NET 2003.

    I learned that it uses different libraries
    when it compiles at "debug mode" and "release mode".

    But how do you find out which libraries are used at each mode ?
    Is it possible to change libraries used at "debug mode" and "release mode"?
    for example, if Visual Studio uses library A at "debug mode" and library B at "release mode" at the moment,
    can you change it to library B : "debug mode" and library A at "release mode" ?

    thank you
    are you speaking about the system libraries or the libraries you are building and using in the project....If it's about system library then I believe it's the same library file with simple #defines in it for each mode. If it's about your executables, then you obviously know there will be two (debug and release) and include the one that is of interest to you in the project.

    Correct me if I have said or seen anything wrong..... :)

    Comment

    • amievil
      New Member
      • Apr 2007
      • 8

      #3
      I'll explain why I asked this question.
      I made 2 programs.

      Program1:
      When I build it with "debug mode", it builds fine and the executable works fine.
      When I build it with "release mode", it fails.
      The error is:"unresolved external symbol _imp_FtpFindFir stFileA@20..... ..blah blah."

      Program2:
      When I build it with "debug mode", it builds fine but when I excecute the executable at different computer, it says "some dll file is missing".
      When I build it with "release mode", it builds fine and excecutes fine at the computer which gave some dll missing error before.

      Can somebody tell me what are the differences and what causes different behaviors?

      Thank you

      Comment

      • arunmib
        New Member
        • May 2007
        • 104

        #4
        Originally posted by amievil

        Program1:
        When I build it with "debug mode", it builds fine and the executable works fine.
        When I build it with "release mode", it fails.
        The error is:"unresolved external symbol _imp_FtpFindFir stFileA@20..... ..blah blah."
        I think you are missing some library file in release mode. For "FtpFindFirstFi leA" you need to include "Wininet.li b" in your project options. You must have included that in DEBUG mode but NOT in RELEASE mode. So please check your project options.

        Originally posted by amievil
        Program2:
        When I build it with "debug mode", it builds fine but when I excecute the executable at different computer, it says "some dll file is missing".
        When I build it with "release mode", it builds fine and excecutes fine at the computer which gave some dll missing error before.
        For this I can only guess....Like have you included some function in DEBUG mode (which uses a specific library) and have excluded that function in RELEASE mode. In this case you do not require that DLL used in DEBUG and hence your program works fine in RELEASE mode.

        Hope my post is of some help....

        Correct me if I have seen or said something wrong... :)

        Comment

        • weaknessforcats
          Recognized Expert Expert
          • Mar 2007
          • 9214

          #5
          When you build in debug mode, the libraries you use contain code to support the debugger. That makes them larger and slower. A release build uses different libraries. These libraries have different names. Typically the debug library manes end in d.

          Comment

          Working...