I wants to export a global variable from dll I define the global variable like below. Assume this variable is defined in A.cpp
extern "C" __declspec(dllexport) int A;
Meanwhile, within the dll, another source file B.cpp wants to use and modify this value. I am wonderring how to declare the variable within B.cpp before using it.
extern "C" int A; ?
If in this case, how does compile recognize between declare and definition?
extern extern "C" int A; ?
It's definitely ill-formed.