E2565 Can't export a local variable (C++)

From RAD Studio
Jump to: navigation, search

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

This occurs when trying to export a locally visible identifier from an unit.

        int main() {
            __declspec(dllexport) int a;        // error: a is local
        }