Opened 8 years ago
Closed 8 years ago
#10386 closed Bugs (fixed)
MSVC link error in asymmetric_coroutine.hpp: symbol already defined
Reported by: | Owned by: | olli | |
---|---|---|---|
Milestone: | To Be Determined | Component: | coroutine |
Version: | Boost 1.56.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Using MSVC2013 I get a link error when using coroutines through ASIO from multiple compilation units, saying that the constructor "push_coroutine< void >::push_coroutine( coroutine_fn fn, attributes const& attrs)" is already defined in another .obj file.
In fact this method (among several others in the same file) are implementations of fully specialized template methods, which are no longer templates, and thus either need to be defined as inline, or moved into a .cpp file.
Attachments (1)
Change History (4)
by , 8 years ago
Attachment: | boost-1_56_0-coroutine_inline_msvc12.patch added |
---|
comment:1 by , 8 years ago
I attached a simple fix which solves the issue for us (marking the methods in question as inline). The patch is incomplete as it only considers the MSVC code branches. In theory the issue should also affect other compilers, but I don't have time/access to another compiler right now to double check.
comment:2 by , 8 years ago
We also had this problem in MSVC. Gcc compiled it with no error though. Adding inline fixes it.
comment:3 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
should be fixed in branch develop
fix for MSVC