Static linking of boost-thread in MFC-DLL and __pRawDllMain

Open
#360 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
build-system

Research direction

Start by reading the linked Stack Overflow question and Boost ticket 8550, then reproduce the vcpkg scenario involving boost-thread, an MFC-DLL, and __pRawDllMain. Done would require establishing why boost-thread is auto-linked in projects that do not use it and identifying a supported fix for the runtime errors without relying on linker-order changes.

Written by the indexing model from the issue text.

Description

When we started using vcpkg we found a problem similar to this: https://stackoverflow.com/questions/3466944/upgrade-of-boost-1-35-to-1-43-causes-linker-error-with-prawdllmain-mfc-relate
There is a workaround here: https://svn.boost.org/trac10/ticket/8550

In our case however, we only see errors at run-time, not build-time. So more regressions could be lurking - the issue is boost-thread gets auto-linked by vcpkg even in projects that are not using it.

Another workaround is to change the linkage order but we don't explicitly set boost-thread as a linker dependency and it seems really crude to kludge it in.

So I am asking if anything has changed since 1.52 / 2011 how this can best be addressed?

Dominant language
C++
Stars
213
Forks
171
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/thread

All issues in boostorg/thread

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.