• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Error from VS

Lopaskurwa

Active Member
Joined
Oct 6, 2017
Messages
873
Solutions
2
Reaction score
49
Where is the problem?

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\atomic(659): error C2338: You've instantiated std::atomic<T> with sizeof(T) equal to 2/4/8 and alignof(T) < sizeof(T). Before VS 2015 Update 2, this would have misbehaved at runtime. VS 2015 Update 2 was fixed to handle this correctly, but the fix inherently changes layout and breaks binary compatibility. Please define _ENABLE_ATOMIC_ALIGNMENT_FIX to acknowledge that you understand this, and that everything you're linking has been compiled with VS 2015 Update 2 (or later). (compiling source file ..\src\outputmessage.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\atomic(669): note: see reference to class template instantiation 'std::_Atomic_base<_Ty,4>' being compiled
with
[
_Ty=boost::lockfree::detail::tagged_index
] (compiling source file ..\src\outputmessage.cpp)
C:\local\boost_1_60_0\boost/lockfree/detail/freelist.hpp(603): note: see reference to class template instantiation 'std::atomic<boost::lockfree::detail::tagged_index>' being compiled (compiling source file ..\src\outputmessage.cpp)
C:\local\boost_1_60_0\boost/lockfree/detail/freelist.hpp(604): note: see reference to class template instantiation 'boost::lockfree::detail::fixed_size_freelist<T,NodeStorage>' being compiled (compiling source file ..\src\outputmessage.cpp)
 
Solution
go to lockfree.h
after
C++:
#define FS_LOCKFREE_H_8C707AEB7C7235A2FBC5D4EDDF03B008
add
C++:
#if _MSC_FULL_VER >= 190023918 // Workaround for VS2015 Update 2 or later. Boost.Lockfree is a header-only library, so this should be safe to do.
#define _ENABLE_ATOMIC_ALIGNMENT_FIX 
#endif
go to lockfree.h
after
C++:
#define FS_LOCKFREE_H_8C707AEB7C7235A2FBC5D4EDDF03B008
add
C++:
#if _MSC_FULL_VER >= 190023918 // Workaround for VS2015 Update 2 or later. Boost.Lockfree is a header-only library, so this should be safe to do.
#define _ENABLE_ATOMIC_ALIGNMENT_FIX 
#endif
 
Solution
Back
Top