NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C2157

'function' : must be declared before use in pragma list

The function name is not declared before being referenced in the list of functions for an alloc_text pragma. The following sample generates C2157:

// uncomment the following function declaration to resolve
// extern "C" void func();

#pragma alloc_text( "func", func)   // C2157

void main() {
}