Global_variable. H file
# # ifndef global_variable_H
# define global_variable_H
Struct _declspec (dllexport) testDllVar {int _test; };
Extern "C" _declspec (dllexport) testDllVar var.
# endif//global_variable_H
Global_variable.
in the CPPTestDllVar var.
After encapsulation in the main. CPP is called
# pragma comment (lib, "global_variable. Lib")
Extern "C" _declspec (dllimport) testDllVar var;//column number
Int main ()
{
Var. _test;
return 0;
}