Closed FreddieAkeroyd closed 2 years ago
I guess I will go with alternative 2. I am really not happy with the permanent Windows dll specific problems. Maybe I should drop Windows support to make my life easier?
fixed in commit dfbd308.
Thanks for fixing - I am happy to help with resolving any windows specific issues, having stream device supported on windows is important for us. I'm assuming EPICS has epicsShareAPI
set to __stdcall
for compatibility with being called from programming languages other than C/C++, though a limitation of __stdcall
is that it does not support variable argument functions hence some EPICS functions (like errlogPrintf
) are not declared with epicsShareAPI
.
Building Stream device 2.8.20 on
win32-x86
fails with the errorbuilding on
windows-x64
works fine.The relevant line is
The issue is caused by
epicsThreadGetNameSelf
being defined asepicsShareAPI
resulting in it using thestdcall
rather than defaultcdecl
calling convention on x86, on x64 Microsoft removedstdcall
and it was aliased tocdecl
hence all compiles OK.There are two options to fix this:
StreamGetThreadNameFunction
signature to includeepicsShareAPI
, however any user defined alternative functions would also need to be declaredepicsShareAPI
toostreamGetThreadNameDefaultFunction()
wrapper function that just callsepicsThreadGetNameSelf()
@dirk-zimoch I am happy to submit a PR, I just wanted to check which your preference was