PandABlocks / ADPandABlocks

EPICS areaDetector driver for streaming data from PandABlocks-server
0 stars 1 forks source link

Compiler error on Windows #3

Open dirk-zimoch opened 3 years ago

dirk-zimoch commented 3 years ago

When compiling for Windows (actually cross-compiling using cl in wine), I get the following error:

z:\git\adpandablocks\adpandablocksapp\src\adpandablocks.cpp(1044): error C2131: expression did not evaluate to a constant
z:\git\adpandablocks\adpandablocksapp\src\adpandablocks.cpp(1044): note: failure was caused by a read of a variable outside its lifetime
z:\git\adpandablocks\adpandablocksapp\src\adpandablocks.cpp(1044): note: see usage of 'readBytes'

Not all compilers allow variable length arrays on the stack. It is probably more portable to use malloc().

thomascobb commented 3 years ago

Hi Dirk, thanks for the report. Unfortunately everyone who has worked on this codebase in the past has now left Diamond, so we're short of effort on this repo. If you have a patch I'd gladly accept it, otherwise it may be a while before this is fixed.