Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ User's Guide - the "extref" pragma is used to generate a reference to an external function http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
The "extref" pragma is used to generate a reference to an external function
or data item.  The form of the "extref" pragma is as follows.

+--------------------------------------------------------------------------+
|      #pragma extref name [;]                                             |
|                                                                          |
+--------------------------------------------------------------------------+

where
    description

name
    is the name of an external function or data item.  It must be declared
    to be an external function or data item before the pragma is
    encountered.  In C++, when name is a function, it must not be
    overloaded.

This pragma causes an external reference for the function or data item to be
emitted into the object file even if that function or data item is not
referenced in the module.  The external reference will cause the linker to
include the module containing that name in the linked program or DLL.

This is useful for debugging since you can cause debugging routines
(callable from within debugger) to be included into a program or DLL to be
debugged.

In C++, you can also force constructors and/or destructors to be called for
a data item without necessarily referencing the data item anywhere in your
code.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson