I've been grappling with this for about a day now and have yet to find the solution. I'm trying to access a global variable, declared in main.cpp, from an Testing.asm file with both files in the same project using Visual Studio 2019. But I'm getting the following linking error:
Error LNK2019 unresolved external symbol referenced in function TestRoutine
// main.cpp
extern "C" int __declspec(dllexport) A; //global variable
.....
########################### Testing.asm #####################
EXTERN A:QWORD
.data
.code
main PROC
main ENDP
TestRoutine PROC PUBLIC
MOV EAX, DWORD PTR A
RET
TestRoutine ENDP
END