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\  
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,851 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
966 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,551 questions
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 42,876 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