RAD Studio |  |

E2471: pragma checkoption failed: options are not as expected (C++)

You can use #pragma checkoption to check that certain switches are in the state that you expect. If #pragma checkoption detects that a switch is not in the expected state, the compiler displays this error.

You can use the following syntax:

Copy Code

    #pragma checkoption <options>

For example:

Copy Code

    #pragma checkoption -O2

OR

Copy Code

    #pragma checkoption -C -O2

The compiler will check if the option(s) are turned on. If all are turned on, nothing happens. If at least one is not turned on, this error is displayed.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!