Message Missing #endif directive. Description The compiler encountered an #if, #ifdef, or #ifndef preprocessing directive without a matching #endif. This might not have been what you intended. The compiler will add the necessary #endif directive at the end of the compilation unit. User Action Make sure every #if, #ifdef and #ifndef has a matching #endif.