epics-modules / motor

APS BCDA synApps module: motor
https://epics-modules.github.io/motor/
20 stars 48 forks source link

Add shareLib.h #168

Closed MarkRivers closed 4 years ago

MarkRivers commented 4 years ago

The new version of asyn does not use shareLib.h. Thus we need to include shareLib.h in these files.

mp49 commented 4 years ago

Would older motor module versions still work with the upcoming Asyn (at least for non-Windows builds)?

MarkRivers commented 4 years ago

Would older motor module versions still work with the upcoming Asyn (at least for non-Windows builds)?

I don't think so. The problem was really a bug, asynMotorController.h and asynMotorAxis.h are using epicsShareClass, so they should have been including shareLib.h. But they were not, they were relying on some asyn include file to do that for them. Now that asyn no longer uses shareLib.h it exposes the bug. But it only needs a 2-line patch.

MarkRivers commented 4 years ago

And I think I did not see the problem when I build for Linux, only for vxWorks?

mp49 commented 4 years ago

That makes sense. Thanks for the clarification.

Would older motor module versions still work with the upcoming Asyn (at least for non-Windows builds)?

I don't think so. The problem was really a bug, asynMotorController.h and asynMotorAxis.h are using epicsShareClass, so they should have been including shareLib.h. But they were not, they were relying on some asyn include file to do that for them. Now that asyn no longer uses shareLib.h it exposes the bug. But it only needs a 2-line patch.