M
mwindham
Guest
How to get a variable declared in asm file to be accessible in a cpp dll? Linker complains Error LNK2001 unresolved external symbol "__int64 qwa" (?qwa@@3_JA) adll_t0 and warns that LNK4078 multiple 'sdata' sections found with different attributes (D0500040) adll D:\c\vs2017\adll\adll\adlla.obj. I've tried "PUBLIC qwa" ,"/Zf",and "/Cp" (all functions in asm work as expected). I have tried in regular data instead of "conflicting" sdata with no avail.
asm
sdata SEGMENT read write shared
qwa dq 123456789abcdefh
sdata ends
dll
pragma data_seg("sdata")
ADLL_API volatile unsigned int uix_ini = -1;
ADLL_API volatile unsigned int ithread = -1;
extern _int64 qwa;
#pragma data_seg()
#pragma comment(linker, "/Section:sdata,RWS")
Continue reading...
asm
sdata SEGMENT read write shared
qwa dq 123456789abcdefh
sdata ends
dll
pragma data_seg("sdata")
ADLL_API volatile unsigned int uix_ini = -1;
ADLL_API volatile unsigned int ithread = -1;
extern _int64 qwa;
#pragma data_seg()
#pragma comment(linker, "/Section:sdata,RWS")
Continue reading...