Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
'identifier' : definition of dllimport function not allowed
Remarks
Data, static data members, and functions can be declared as dllimports but not defined as dllimports.
To fix this issue, remove the __declspec(dllimport) specifier from the definition of the function.
Example
The following example generates C2491:
// C2491.cpp
// compile with: /c
// function definition
void __declspec(dllimport) funcB() {} // C2491
// function declaration
void __declspec(dllimport) funcB(); // OK