halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.78k stars 1.07k forks source link

build error c2894,2733 in ninja msvc cmake settings #8328

Open phengxu opened 6 days ago

phengxu commented 6 days ago

I check my code base and the generated header files, that there are no extern c block that include c++ header files or defined any template, overload function, but still encounter such error

D:\surround360\vcpkg\installed\x64-windows\include\HalideRuntime.h(2033): error C2894: Templates cannot be declared to have "C" linkage

D:\surround360\vcpkg\installed\x64-windows\include\HalideRuntime.h(2064): error C2733: 'halide_type_of': cannot overload function with external "C" linkage D:\surround360\vcpkg\installed\x64-windows\include\HalideRuntime.h(2047): note: see declaration of 'halide_type_of'

is that caused by the halide relate header files?