cannot initialize pointer to code-based object 'identifier'
You're trying to statically initialize a pointer to a code-based object. Pointers to code-based objects must be dynamically initialized.
Here's an example of the type of statements that can cause this problem:
__declspec(allocate("_CODE")) int i ;
int *p = &i ;
To fix this, rewrite the statements to dynamically initialize the problem pointer. The above example could be fixed thus:
__declspec(allocate("_CODE")) int i ;
int *p ;
main() {
p = &i ;
.
.
.
}