I am trying to get a dll in bloodshed to work with a shared integer called my_int.
From reviewing a previous post on here I have the following code which compiles with no errors but will not work with 4.9.9.2.
The previous post does not give any informaton if this is allowed in a bloodshed C project or not.
Maybe someone knows for sure or can tell me what I am doing wrong.
Thanks in advance.
// code in the DLL
int my_int = 0;
init.exe initializes my_int to 1234 and prints it out.
test.exe is suppose to increment my_int and display the results.
The results always come back as 1 instead of 1235 which tells me the variable is not shared.
Log in to post a comment.
I am trying to get a dll in bloodshed to work with a shared integer called my_int.
From reviewing a previous post on here I have the following code which compiles with no errors but will not work with 4.9.9.2.
The previous post does not give any informaton if this is allowed in a bloodshed C project or not.
Maybe someone knows for sure or can tell me what I am doing wrong.
Thanks in advance.
// code in the DLL
pragma data_seg(".shared")
int my_int = 0;
pragma data_seg()
pragma comment(linker,"/SECTION:.shared,RWS")
init.exe initializes my_int to 1234 and prints it out.
test.exe is suppose to increment my_int and display the results.
The results always come back as 1 instead of 1235 which tells me the variable is not shared.