Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code no longer compiles with MSVC #20

Closed
srcejon opened this issue Sep 20, 2022 · 6 comments
Closed

Code no longer compiles with MSVC #20

srcejon opened this issue Sep 20, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@srcejon
Copy link
Contributor

srcejon commented Sep 20, 2022

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?

@srcejon srcejon added the bug Something isn't working label Sep 20, 2022
@Xerbo
Copy link
Owner

Xerbo commented Sep 20, 2022

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

@Xerbo
Copy link
Owner

Xerbo commented Sep 20, 2022

MSVC seems to implement all the POSIX complex functions and the I constant so in theory this should work

@srcejon
Copy link
Contributor Author

srcejon commented Sep 21, 2022

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.

Xerbo added a commit that referenced this issue Sep 24, 2022
@Xerbo
Copy link
Owner

Xerbo commented Sep 29, 2022

This should be fixed, can you check?

@srcejon
Copy link
Contributor Author

srcejon commented Sep 29, 2022

It compiles, thanks. Will try integrating it a little later on.

@srcejon
Copy link
Contributor Author

srcejon commented Sep 30, 2022

Seems to work fine on Linux and Windows. Thanks.

@srcejon srcejon closed this as completed Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants