kfrlib / kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
https://www.kfrlib.com
GNU General Public License v2.0
1.67k stars 256 forks source link

error with bitcast #35

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hello,

I'm trying to use the latest version of the kfrlib with VS2017 and I get these errors:

constants.hpp(145): error C3861: 'bitcast': identifier not found constants.hpp(191): note: see reference to class template instantiation 'kfr::constants' being compiled constants.hpp(149): error C3861: 'bitcast': identifier not found constants.hpp(179): error C3861: 'bitcast': identifier not found constants.hpp(183): error C3861: 'bitcast': identifier not found

and my test application is as simple as this:

include <kfr/all.hpp>

using namespace kfr;

int main() { return 0; }

ww0439 commented 5 years ago

you should use clang7.0 in vs2017

ghost commented 5 years ago

If I use cmake to create a .sln file, then the error won't appear, I cannot figure out the difference in those two cases. I need to use this on Android eventually so clang 7.0 is not an option for me.

dancazarin commented 5 years ago

Hi,

Visual Studio 2017 contains some bugs in C++14 support. Workarounds exist and compatibility is improving. But you still need clang 4.0+ to use all the features and get best possible performance, more details in README.

Visual Studio for Android uses clang under the hood, so lack of full compatibility with native MSVC compiler is not an issue for Android C++ projects. Official Android NDK also uses clang by default for C++.