Piasy02/04/2023, 3:59 AM
. I didn’t specify the LIBCMT.lib dependency anywhere in my build scripts, so it seems like a bug in the konan toolchain, which uses the wrong x86 version of LIBCMT.lib instead of x64 version, could anybody help me take a look into it? thanks! The attachment is my minimum reproduce project, run the
error: LIBCMT.lib(std_type_info_static.obj): machine type x86 conflicts with x64
gradle task could reproduce it. The C++ code static library is built by the
batch script. BTW, I’m using the latest 1.8.0 kotlin version, but I also tried 1.7.21, which also didn’t work.
C:\Users\Admin\source\kmp-windows-x64-repro>.\gradlew runDebugExecutableNative > Task :linkDebugExecutableNative FAILED e: C:\Users\Admin\.konan\dependencies\llvm-11.1.0-windows-x64-essentials/bin/clang++ invocation reported errors The C:\Users\Admin\.konan\dependencies\llvm-11.1.0-windows-x64-essentials/bin/clang++ command returned non-zero exit code: 1. output: lld-link: error: LIBCMT.lib(std_type_info_static.obj): machine type x86 conflicts with x64 lld-link: error: LIBCMT.lib(delete_scalar_size.obj): machine type x86 conflicts with x64 lld-link: error: LIBCMT.lib(delete_scalar.obj): machine type x86 conflicts with x64 clang++: error: linker command failed with exit code 1 (use -v to see invocation) FAILURE: Build failed with an exception.