Skip to main content
Knowledgebase
Home
Renesas Electronics America - Knowledgebase

What do you mean the main function that automatically generated by HEW?

Latest Updated:05/23/2006

Question:

[High-performance Embedded Workshop V.3] I do not understand the meaning of the main function which is automatically generated by High-performance Embedded Workshop.

Answer:

<Program>

#ifdef __cplusplus

extern "C" {

  void abort(void);

#endif

  void main(void);

#ifdef __cplusplus

}

#endif

__cplusplus takes the automatically defined macros when it compiles C++ source code.

An explanation of program is

(1)C source code

void abort( void );

(2)C++ source code becomes.....

extern "C" {

void abort( void );

}

A program is output in which extern "C" is put in C++ language since the abort function is required to declare in C linkage.

Suitable Products
High-performance Embedded Workshop