Hello,
i have an event driven c library that needs to notify the thing it links with that a status has changed. i cant call a function because obviously it would be present at compile time of the library.
i also defined an extern int and then defined int in the executable that links with the library but it created its own copy; it couldnt see the extern int from the library.
my question is can i define an int (it just needs to be a flag) that has a larger scope than one compile sesh i.e. something as visible as a function (i know how bad that sounds)
thanks for your help
PS: is there another way i could pass info from a library to an executable that is linked with it? (ideally i would like to have a function in the 'client' executable that is called by the library)
all the functions i used to call the library functions have exited by then btw