Erik de Castro Lopo wrote:
lvqcl wrote:
error LNK2019: unresolved external symbol ___cpuidex referenced in function
_FLAC__cpu_info_x86 libflac_static.lib
fatal error LNK1120: 1 unresolved externals flac.exe
The code
if (FLAC__AVX_SUPPORTED)
__cpuidex(cpuinfo, level, 0); /* for AVX2 detection */
else
__cpuid(cpuinfo, level); /* some old compilers don't support __cpuidex
*/
adds reference to __cpuidex() even though MSVC2005 doesn't have it
(according to MSDN, it was added to MSVC 2008 SP1).
That suggests that FLAC__AVX_SUPPORTED is true. Can you set it to false
for MSVC2005?
No, FLAC__AVX_SUPPORTED is 0 (initially it's undefined, then inside cpu.h
it's defined as 0).
MSVC cannot discard unused references in debug builds and when LTCG is on,
for example:
<http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2016-April/193437.html>
And currently LTCG is enabled for release builds.
_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev