#pragma entry (OS/2, Windows)

Description

The #pragma entry directive specifies the function to be used as the entry point for the application being built.

Syntax

The function_name is the name of the function to be used as an entry point. This function must be in the same compilation unit as the #pragma entry directive. The following types of functions cannot be used with #pragma entry:

Normally when an application is started, the system calls the C library entry point. When you specify a different entry point using the #pragma entry, the system calls that entry point and does not perform any C library initialization or termination. If you use #pragma entry, you must ensure that your executable file does not require library initialization or termination, or you must provide your own initialization and termination functions.