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

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

In the C++ construction

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:

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:

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