The missing DLL was qwt.dll. Making this available stopped the error, I don't know why. I do have a lot of global variables.