xiph / opus-tools

A set of tools to encode, inspect, and decode audio in the Opus format.
https://opus-codec.org/
Other
218 stars 79 forks source link

visual Studio2015 build opusenc fail #32

Closed AheadSnail closed 6 years ago

AheadSnail commented 6 years ago

I cloned the opus-tools project from github and compiled it using visual studio2015, but the opusenc module failed to compile. The other two modules succeeded. Here is my error message.

2> libFLAC_static.lib (stream_decoder.obj): find MSIL .netmodule or module compiled with /GL; restarting link using /LTCG; add /LTCG to link command line to improve linker performance 2>LINK : warning LNK4075: Ignore "/INCREMENTAL" (due to the "/LTCG" specification) 2>libogg_static.lib(framing.obj) : warning LNK4075: Ignoring "/EDITANDCONTINUE" (due to the "/OPT:LBR" specification) 2>LINK : warning LNK4098: The default library "LIBCMT" conflicts with the use of other libraries; use /NODEFAULTLIB:library 2>opusenc.lib(opusenc.obj) : error LNK2001: Unresolved external symbol _opus_projection_ambisonics_encoder_create 2>opusenc.lib(opusenc.obj) : error LNK2001: Unresolved external symbol _opus_projection_encode_float 2>opusenc.lib(opusenc.obj) : error LNK2001: Unresolved external symbol _opus_projection_encoder_destroy 2>opusenc.lib(opusenc.obj) : error LNK2001: Unresolved external symbol _opus_projection_encoder_ctl 2>opusenc.lib(opus_header.obj) : error LNK2001: Unresolved external symbol _opus_projection_encoder_ctl 2>Win32\Debug\opusenc.exe : fatal error LNK1120: 4 unresolved external commands ========== All regeneration: 1 success, 1 failure, skip 0 ==========

Please help me to see what caused the problem

AheadSnail commented 6 years ago

I had tried it still had error message

2> 正在生成代码... 2>opusenc.lib(opusenc.obj) : error LNK2019: 无法解析的外部符号 _opus_projection_ambisonics_encoder_create,该符号在函数 _opeint_encoder_surround_init 中被引用 2>opusenc.lib(opusenc.obj) : error LNK2019: 无法解析的外部符号 _opus_projection_encode_float,该符号在函数 _opeint_encode_float 中被引用 2>opusenc.lib(opusenc.obj) : error LNK2019: 无法解析的外部符号 _opus_projection_encoder_destroy,该符号在函数 _opeint_encoder_cleanup 中被引用 2>opusenc.lib(opusenc.obj) : error LNK2019: 无法解析的外部符号 _opus_projection_encoder_ctl,该符号在函数 _ope_encoder_create_callbacks 中被引用 2>opusenc.lib(opus_header.obj) : error LNK2001: 无法解析的外部符号 _opus_projection_encoder_ctl 2>Win32\Debug\opusenc.exe : fatal error LNK1120: 4 个无法解析的外部命令

mark4o commented 6 years ago

Thanks for the report. This was caused by missing source files in the libopus visual studio project. The missing source files have now been added to the visual studio solution file in libopus git master.