Am I doing something stupid here?? The following code is in a DLL:-
It's almost as if _superclock_ticks_per_second is being treated as const (or are static globals in a DLL automatically const ??
Code:
// In a header file while building the DLL (i.e. assume that
// LIBTEMPORAL_API handles import or export, as appropriate)
namespace Temporal {
typedef int64_t superclock_t;
static superclock_t _superclock_ticks_per_second = 282240000;
LIBTEMPORAL_API void set_superclock_ticks_per_second (superclock_t sc);
}
// In one of the DLL's source files
void
Temporal::set_superclock_ticks_per_second (Temporal::superclock_t sc)
{
_superclock_ticks_per_second = sc; // <--- Never changes the value of _superclock_ticks_per_second !!!!
}