If I remove “constexpr” completely, thus “static double ASAP = 0.0 ;”, I get a different error, E1592, “a member with an in-class initialize must be const”.
I also did a ‘update’ to my MSVC 2017 installation, to make sure it is current, but that did not change anything. Trying “static const double ASAP = 0.0 ;”, I get error E1591, a member of type “const double” cannot have an in-class initializer. It looks like making it “const double ASAP = 0.0 ;”, gets rid of the that error. But then I end up with 100’s of errors, C2440 ‘default argumnet’: cannot convert from ‘unknown’ to uhd::timespect_t(), and E2597, illegal reference to non-static member ‘uhd::time_spec_t::ASAP. Any suggestions? Regards, Ken From: Michael Dickens [mailto:michael.dick...@ettus.com] Sent: Monday, April 27, 2020 17:17 To: Clark (US), Kenneth C <kenneth.c.cla...@boeing.com> Cc: usrp-users@lists.ettus.com; supp...@ettus.com Subject: Re: Build Error in MSVC 2017 in time_spec.hpp Hi Ken - Try removing the "constexpr" entirely. We love "const" and "constexpr", but some compilers don't love them in various forms / combinations :) Hopefully that will get you past that issue. - MLD --- Michael Dickens Ettus Research Technical Support Email: supp...@ettus.com<mailto:supp...@ettus.com> Web: https://ettus.com/ On Mon, Apr 27, 2020 at 1:08 PM Clark (US), Kenneth C <kenneth.c.cla...@boeing.com<mailto:kenneth.c.cla...@boeing.com>> wrote: Hello, Trying to build the "host" applications on Windows 10, MSVC 2017 (aka 141). The line below in time_spec.hpp static constexpr double ASAP = 0.0; Generates error E0145 in MSVC 2017, "member "uhd::time_spec_t::ASAP" may not be initialized" I have tried not initializing it, making it const instead of constexpr, but still get errors. This same code base builds find in Linux (current Ubuntu distro). Any ideas? Thanks, Ken
_______________________________________________ USRP-users mailing list USRP-users@lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com