k2-fsa / sherpa-onnx

Speech-to-text, text-to-speech, speaker recognition, and VAD using next-gen Kaldi with onnxruntime without Internet connection. Support embedded systems, Android, iOS, Raspberry Pi, RISC-V, x86_64 servers, websocket server/client, C/C++, Python, Kotlin, C#, Go, NodeJS, Java, Swift, Dart, JavaScript, Flutter, Object Pascal, Lazarus, Rust
https://k2-fsa.github.io/sherpa/onnx/index.html
Apache License 2.0
3.23k stars 377 forks source link

Error when build debug mode on Windows #1216

Closed thewh1teagle closed 3 weeks ago

thewh1teagle commented 1 month ago

Build commands:

git clone https://github.com/k2-fsa/sherpa-onnx
cd sherpa-onnx
cmake -B build .
cmake --build build -j8

Note: the error disapper if I add -DCMAKE_BUILD_TYPE=Release

Error:

onnxruntime.lib(subgraph_gpt.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't mat
ch value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(subgraph_gpt.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doe
sn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-mic
rophone.vcxproj]
onnxruntime.lib(subgraph_t5_encoder.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' does
n't match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj
]
onnxruntime.lib(subgraph_t5_encoder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelea
se' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-o
nnx-microphone.vcxproj]
onnxruntime.lib(subgraph_t5_decoder.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' does
n't match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj
]
onnxruntime.lib(subgraph_t5_decoder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelea
se' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-o
nnx-microphone.vcxproj]
onnxruntime.lib(subgraph_whisper_encoder.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0'
 doesn't match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vc
xproj]
onnxruntime.lib(subgraph_whisper_encoder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_Static
Release' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\she
rpa-onnx-microphone.vcxproj]
onnxruntime.lib(subgraph_whisper_decoder.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0'
 doesn't match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vc
xproj]
onnxruntime.lib(subgraph_whisper_decoder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_Static
Release' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\she
rpa-onnx-microphone.vcxproj]
D:\sherpa-onnx\build\bin\Debug\sherpa-onnx-keyword-spotter.exe : fatal error LNK1319: 1042 mismatches detected [D:\sher
pa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-keyword-spotter.vcxproj]
onnxruntime.lib(beam_search_scorer.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn
't match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(beam_search_scorer.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticReleas
e' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-on
nx-microphone.vcxproj]
onnxruntime.lib(greedy_search_parameters.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0'
 doesn't match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vc
xproj]
onnxruntime.lib(greedy_search_parameters.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_Static
Release' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\she
rpa-onnx-microphone.vcxproj]
onnxruntime.lib(sampling_parameters.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' does
n't match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj
]
onnxruntime.lib(sampling_parameters.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelea
se' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-o
nnx-microphone.vcxproj]
onnxruntime.lib(bahdanau_attention.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn
't match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(bahdanau_attention.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticReleas
e' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-on
nx-microphone.vcxproj]
onnxruntime.lib(attention_wrapper.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn'
t match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(attention_wrapper.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease
' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onn
x-microphone.vcxproj]
onnxruntime.lib(uni_dir_attn_lstm.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn'
t match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(uni_dir_attn_lstm.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease
' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onn
x-microphone.vcxproj]
onnxruntime.lib(sqnbitgemm.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match
 value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(sqnbitgemm.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn
't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-micro
phone.vcxproj]
onnxruntime.lib(neural_speed_gemm.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn'
t match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(neural_speed_gemm.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease
' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onn
x-microphone.vcxproj]
onnxruntime.lib(q4gemm.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match val
ue '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(q4gemm.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't m
atch value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphon
e.vcxproj]
onnxruntime.lib(bias_gelu_helper.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't
 match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(bias_gelu_helper.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease'
 doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx
-microphone.vcxproj]
onnxruntime.lib(uni_directional_lstm.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doe
sn't match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxpro
j]
onnxruntime.lib(uni_directional_lstm.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRele
ase' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-
onnx-microphone.vcxproj]
onnxruntime.lib(qgemm_kernel_default.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doe
sn't match value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxpro
j]
onnxruntime.lib(qgemm_kernel_default.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRele
ase' doesn't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-
onnx-microphone.vcxproj]
onnxruntime.lib(stringpiece.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't matc
h value '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(stringpiece.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' does
n't match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-micr
ophone.vcxproj]
onnxruntime.lib(strutil.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match va
lue '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(strutil.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't
match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-micropho
ne.vcxproj]
onnxruntime.lib(prog.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value
 '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(prog.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't mat
ch value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.
vcxproj]
onnxruntime.lib(nfa.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value
'2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(nfa.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't matc
h value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.v
cxproj]
onnxruntime.lib(dfa.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value
'2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(dfa.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't matc
h value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.v
cxproj]
onnxruntime.lib(onepass.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match va
lue '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(onepass.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't
match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-micropho
ne.vcxproj]
onnxruntime.lib(bitstate.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match v
alue '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(bitstate.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't
 match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microph
one.vcxproj]
onnxruntime.lib(regexp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match val
ue '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(regexp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't m
atch value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphon
e.vcxproj]
onnxruntime.lib(parse.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match valu
e '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(parse.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't ma
tch value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone
.vcxproj]
onnxruntime.lib(compile.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match va
lue '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(compile.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't
match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-micropho
ne.vcxproj]
onnxruntime.lib(utils.cc.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match v
alue '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(utils.cc.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't
 match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microph
one.vcxproj]
onnxruntime.lib(tostring.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match v
alue '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(tostring.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't
 match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microph
one.vcxproj]
onnxruntime.lib(simplify.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match v
alue '2' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
onnxruntime.lib(simplify.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't
 match value 'MTd_StaticDebug' in sherpa-onnx-microphone.obj [D:\sherpa-onnx\build\sherpa-onnx\csrc\sherpa-onnx-microph
one.vcxproj]
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library [D:\sherpa-onnx
\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
D:\sherpa-onnx\build\bin\Debug\sherpa-onnx-microphone.exe : fatal error LNK1319: 1042 mismatches detected [D:\sherpa-on
nx\build\sherpa-onnx\csrc\sherpa-onnx-microphone.vcxproj]
csukuangfj commented 3 weeks ago

Please specify either Release or Debug when you run, as described in the doc.