RAD Studio |  |

E2059: Unknown language, must be C or C++ (C++)

In the C++ construction

Copy Code

    extern "name" type func( /*...*/ );

the given "name" must be "C" or "C++" (use the quotes); other language names are not recognized.

You can declare an external Pascal function without the compiler's renaming like this:

Copy Code

    extern "C" int pascal func( /*...*/ );

To declare a (possibly overloaded) C++ function as Pascal and allow the usual compiler renaming (to allow overloading), you can do this:

Copy Code

    extern int pascal func( /*...*/ );

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!