Compiler Error C2194

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C2194.

identifier' : is a text segment

The data_seg pragma uses a segment name used with code_seg.

The following sample generates C2194:

// C2194.cpp  
// compile with: /c  
#pragma code_seg("MYCODE")  
#pragma data_seg("MYCODE")   // C2194  
#pragma data_seg("MYCODE2")   // OK  

Show: