Data2Dynamics / d2d

a modeling environment tailored to parameter estimation in dynamical systems
https://github.com/Data2Dynamics/d2d
57 stars 29 forks source link

Issue on newer versions of MSVC #98

Closed JoepVanlier closed 6 years ago

JoepVanlier commented 6 years ago

On certain newer versions of visual studio, we have a conflict with pthreads's definition of timespec. Since it is already defined in the windows includes, we have to prevent pthreads from redefining it. To prevent this, the additional mex flag "-DHAVE_STRUCT_TIMESPEC" is required. Problem is, we cannot use this flag for SDKs where it is not.

I'm not sure what combinations of MSVC and windows CRT this occurs on, but it definitely happens on MSVC 2017 community (stock install).

JoepVanlier commented 6 years ago

Added a function arNewMSVC for those who have this issue. Will also add a brief mention to the wiki.