Is this a normal behavior that generated .lib file does not compatible on different build mode? (debug/release/x64/x86)

thebluetropics 1,046 Reputation points
2022-10-28T10:19:35.703+00:00

There is two different build configuration (Debug/Release) and two different debug platforms (x64/Win32)

When I build a static library project, it generates .lib file based on build configuration and build platform:

   build\  
     release\x64\mylib.lib  
     debug\x64\mylib.lib  

Is this a normal behavior with Visual Studio? As far as I know, we can combine Release and Debug configuration into a single .lib file.
How can I do that in VS2022?

If that is not possible, I just separate lib folder for different build configuration (in my other project that uses mylib):

   lib\  
     release\x64\  
     debug\x64\  
Developer technologies | Visual Studio | Debugging
Developer technologies | Visual Studio | Other
Community Center | Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 49,636 Reputation points
    2022-10-28T10:33:10.277+00:00

    Is this a normal behavior with Visual Studio?

    Yes.

    As far as I know, we can combine Release and Debug configuration into a single .lib file.

    This is incorrect.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.