stacktrace icon indicating copy to clipboard operation
stacktrace copied to clipboard

automatic linking for VS projects

Open apotocki opened this issue 6 years ago • 4 comments

Hi Anton! Why don't you use boost/config/auto_link.hpp to avoid manual linking for VS when one of the link macroses is defined?

apotocki avatar May 10 '19 07:05 apotocki

Hi there!

There are different "backends" for the library https://www.boost.org/doc/libs/1_70_0/doc/html/stacktrace/configuration_and_build.html and it is impossible to predict which one are you going to use.

For example in debug mode you may wish to link with boost_stacktrace_windbg_cached and in release mode sometimes you may wish to disable tracing via linking with boost_stacktrace_noop.

apolukhin avatar May 10 '19 07:05 apolukhin

I could specify my wishes by macroses you provided (e.g. BOOST_STACKTRACE_USE_WINDBG_CACHED or BOOST_STACKTRACE_USE_NOOP). But now I have to delve into naming, versioning and etc of the library.

apotocki avatar May 10 '19 08:05 apotocki

Hm... The manual linking in the library was intended for quick switching between boost_stacktrace_windbg_cached and boost_stacktrace_noop without recompilation.

Linking with appropriate library when the macro defined will kill that feature. But it will simplify library usage for users who do not need quick backend switching.

Sounds like a good feature!

apolukhin avatar May 13 '19 07:05 apolukhin

For people who want the manual linking, you can introduce additional macros that would stop auto_link. BTW, are there other boost libraries that require manual linking on Windows by default?

apotocki avatar May 13 '19 08:05 apotocki