Managing / Using Assembly Libraries Debug vs Assembly Release

I'm curious how all practices are dealt with when it comes to using or distributing libraries for the application you are writing.

First, when developing an application, do you link the debug or release versions of the libraries? (When you launch the application in debug mode)

Then, when you launch the application in release mode just before deployment, which library do you use?

How do you switch between debug and release library versions? You do it manually, do you use macros or something else that you do?

+3
source share
2 answers

First, I determine what requirements are needed in the library:

  • Debug/Release
  • Unicode
  • ..

, .

, , . , Windows/VS , debug release libs .

Visual Studio, Configuration Manager, , , , .

, .

  • Debug + Unicode
  • Debug + ASCII
  • Release + Unicode
  • Release + ASCII

Configuration Manager .

, , , . VS, , , , . _DEBUG _RELEASE, .

/ ?

EDIT: .

Configuration Manager , :

  • LinkerLinker

$(ConfigurationName) , . Debug/Release.

$(ProjectDir)\..\third-party-prj\$(ConfigurationName)\third-party.lib
  • Custom Step Step

() ( ) .

xcopy $(ProjectDir)\..\third-party-prj\$(ConfigurationName)\third-party.dll $(IntDir)

$(ProjectDir) . $(ConfigurationName) ( - Debug Release), , .

, , $(ConfigurationName), .

+3

VS. , , - , , . . . - . , , , "3rdParty" "libs" , "src" svn. , , "lib" .

, debug, svn-. , , svn- . .

... ... , , , . , . , , , , , : "stack.dll" "......\3rdParty \" "......\3rdPartyD \" .

-, . ? , - . . , , , . ?

0

Source: https://habr.com/ru/post/1696697/


All Articles