Code no longer compiles with MSVC
srcejon opened this issue · 6 comments
With the introduction of the complex data type, aptdec no longer compiles with MSVC, which is a shame, as the latest code can't be included in SDRangel
It's possible to write a little abstraction layer, so complex types can be used both with gcc/clang/MSVC, see here as an example:
https://github.com/srcejon/codec2/blob/windows-freedv/src/compiler.h
Would you be open to a patch that used something along these lines?
https://learn.microsoft.com/en-us/cpp/c-runtime-library/complex-math-support?view=msvc-170 MSVC seems to have its own complex library, just different to POSIX, can you confirm?
EDIT: I have seen the link you have sent I will get on this right away
MSVC seems to implement all the POSIX complex functions and the I
constant so in theory this should work
Thanks. It's not necessary to add zenith back in, I can remove that SDRangel. It's the complex in the hilbert_transform that's the main problem.
This should be fixed, can you check?
It compiles, thanks. Will try integrating it a little later on.
Seems to work fine on Linux and Windows. Thanks.