Compiler Error C2193
'identifier' : already in a segment
A function was placed in two different segments using alloc_text
and code_seg
pragmas.
The following sample generates C2193:
// C2193.cpp
// compile with: /c
extern "C" void MYFUNCTION();
#pragma alloc_text(MYCODE, MYFUNCTION)
#pragma code_seg("MYCODE2")
extern "C" void MYFUNCTION() {} // C2193
extern "C" void MYFUNCTION2() {}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for