7.1.3 Declaring the calling convention modier

To make sure that all parameters are correctly passed to the external routines, you should declare it with the correct calling convention modier. When linking with code blocks compiled with standard C compilers (such as GCC), the cdecl modier should be used so as to indicate that the external routine uses C type calling conventions. For more information on the supported calling conventions, section 6.3, page 319.

As might expected, external variable declarations do not require any calling convention modier.