• 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!

C++ compiling TFS old with MVS 2015

silveralol

Advanced OT User
Joined
Mar 16, 2010
Messages
1,480
Solutions
9
Reaction score
211
hello, then I'm trying update the compiler of my old source tfs ..
then I update the project, the boost aswell, but I get an error when try compile
Code:
Severity    Code    Description    Project    File    Line    Suppression State
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)    theforgottenserver    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\atomic    659
I came here because someone else could had the same error before
 
Solution
It's telling you why it's doing that, what to do and consequences of doing that, pure english, you just has to define this macro as it said _ENABLE_ATOMIC_ALIGNMENT_FIX.
This error might be obvious to you but it isn't obvious to the person looking for help.
This error is not directly linked to the TFS sources, its an STL error, why not just provide the solution and leave the attitude at the door?

hello, then I'm trying update the compiler of my old source tfs ..
then I update the project, the boost aswell, but I get an error when try compile
Code:
Severity    Code    Description    Project    File    Line    Suppression State
Error    C2338    You've instantiated std::atomic<T> with sizeof(T) equal to 2/4/8 and alignof(T) <...
It's telling you why it's doing that, what to do and consequences of doing that, pure english, you just has to define this macro as it said _ENABLE_ATOMIC_ALIGNMENT_FIX.
 
It's telling you why it's doing that, what to do and consequences of doing that, pure english, you just has to define this macro as it said _ENABLE_ATOMIC_ALIGNMENT_FIX.
This error might be obvious to you but it isn't obvious to the person looking for help.
This error is not directly linked to the TFS sources, its an STL error, why not just provide the solution and leave the attitude at the door?

hello, then I'm trying update the compiler of my old source tfs ..
then I update the project, the boost aswell, but I get an error when try compile
Code:
Severity    Code    Description    Project    File    Line    Suppression State
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)    theforgottenserver    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\atomic    659
I came here because someone else could had the same error before
I did some digging and according to this.
VS 2015 Update 2 · Issue #1754 · otland/forgottenserver · GitHub

He says it has something to do with this file here
forgottenserver/lockfree.h at cc8e15e9166359faa52d38823e679355a615ab23 · otland/forgottenserver · GitHub

Other than that I have no idea.
 
Solution
This error might be obvious to you but it isn't obvious to the person looking for help.
This error is not directly linked to the TFS sources, its an STL error, why not just provide the solution and leave the attitude at the door?


I did some digging and according to this.
VS 2015 Update 2 · Issue #1754 · otland/forgottenserver · GitHub

He says it has something to do with this file here
forgottenserver/lockfree.h at cc8e15e9166359faa52d38823e679355a615ab23 · otland/forgottenserver · GitHub

Other than that I have no idea.
Can't believe Codex, but your attitude changed too :D
I'm happy to see that tbh.
 
thanks, it was solved, I saw the problem...
I was trying use
Code:
#if _MSC_FULL_VER == 190023918
but ofc will not work because the version is highter, then just change the logic operator

#if _MSC_FULL_VER >= 190023918
and it will work :3
 
This error is not directly linked to the TFS sources, its an STL error,
it's not, it was a mscl bug, nothing to do with stl
This error is not directly linked to the TFS sources, its an STL error, why not just provide the solution and leave the attitude at the door?
compiler gave him a solution i just tried to make it clear, and your solution is exactly the same as i said, don't really know where you're trying to get with that.
 
Back
Top