pouët.net

Problem compiling 4k intro code in Visual Studio 2012

category: code [glöplog]
 
I've got a working codebase for VS2010, but when using the VS2012 compiler, I'm getting these strange errors:

Quote:

Error 3 error C2193: 'void __cdecl `dynamic atexit destructor for 'public: static std::_Generic_error_category std::_Error_objects<int>::_Generic_object''(void)' : already in a segment c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0 627 1 bp4k
Error 2 error C2193: 'void __cdecl `dynamic atexit destructor for 'public: static std::_Iostream_error_category std::_Error_objects<int>::_Iostream_object''(void)' : already in a segment c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0 627 1 bp4k
Error 1 error C2193: 'void __cdecl `dynamic atexit destructor for 'public: static std::_System_error_category std::_Error_objects<int>::_System_object''(void)' : already in a segment c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0 627 1 bp4k


I just wanted to quickly ask if some of you have already encountered this problem and know what causes it, before I dissect the whole code...

Any help is appreciated.
added on the 2013-07-23 20:29:06 by xTr1m xTr1m
i had a lot of problems linking against crinkler with VS2010, i made it work eventually, but had to fiddle around a lot in VS-Settings.
these errors look familiar from my journey back then, but as i switched back to VS2008 anyway, i have no idea, my wild guess is your Project is using the standard-linker instead of crinkler, thus throwing such strange errors.
Yes this is for the debug configuration, sorry, I'm not using crinkler there. But my code looks like pretty standard 4k intro code, with lots of #pragma code_seg and #pragma data_seg blocks in one huge cpp file. Could the problem lie there?
added on the 2013-07-23 20:47:59 by xTr1m xTr1m
Yes, that was it. If I wrapp all #pragma code_seg lines in #ifndef _DEBUG #endif blocks, it works... Do I have to do this or is there something else I'm missing?
added on the 2013-07-23 20:58:18 by xTr1m xTr1m
no idea, having no problems with em pragmas in VS2008 and not using crinkler, the standard linker just ignores them as far as i know. maybe thats different with the VS2012-standard-linker.
Let´s hope someone pops in here soon to help you, as i can´t, obviously!
Good thing is you can always go back to VS2010 if you really dont get this weird behavior fixed.
good to hear it´s working. :)
time to get my lazy ass up so you get some competition at evoke, i guess.
That'd be great, I always love a good compo!
added on the 2013-07-23 21:42:03 by xTr1m xTr1m

login