Chilli
05/01/2020, 4:43 PMe: C:\Users\Chilli\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1/bin/clang++ invocation reported errors
The C:\Users\Chilli\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1/bin/clang++ command returned non-zero exit code: 1.
output:
C:\Users\Chilli\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1\bin\ld: C:\Users\Chilli\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1\bin\ld: DWARF error: mangled line number section (bad file number)
C:\Users\Chilli\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1\bin\ld: DWARF error: mangled line number section (bad file number)
...
C:\Users\Chilli\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1\bin\ld: DWARF error: mangled line number section (bad file number)
C:\Users\Chilli\AppData\Local\Temp\konan_temp2904216670241181048\result.o:out:(.text+0x7e4d1): undefined reference to `GetUserNameExA'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
> Task :linkDebugSharedWindows FAILED
Execution failed for task ':linkDebugSharedWindows'.
> Compilation finished with errors
Just if the reference weren't there, but IntelliJ does see this function. It's a function from secext.h that I'm importing using secext.def:
headers = secext_wrapper.h
headerFilter = secext.h
package = me.[...].cinterop.secext
linkerOpts.mingw = -lpsapi
and secext_wrapper.h:
#pragma once
#include <windows.h>
#define SECURITY_WIN32
#include <security.h>
Any idea why doesn't it work?Kris Wong
05/01/2020, 4:46 PMChilli
05/01/2020, 4:47 PMsecext_wrapper.h
is my own header, compiled (successfully) with cinterop in Gradle and secext.h
is a header from Windows SDK, included in security.h
Kris Wong
05/01/2020, 4:50 PMChilli
05/01/2020, 4:52 PMArtyom Degtyarev [JB]
05/07/2020, 8:43 AMsecext.h
to the header filter? If I understood you correctly, without this line your interop was fine.Chilli
05/07/2020, 8:44 AMChilli
05/07/2020, 8:44 AMArtyom Degtyarev [JB]
05/07/2020, 8:57 AMheaders = secext_wrapper.h
package = me.[...].cinterop.secext
linkerOpts.mingw = -lpsapi
With some Kotlin stubs including the GetUserNameExA
function, but cannot compile it correctly? Probably, one should add some other linker options, something about secur32.Chilli
05/07/2020, 8:58 AMArtyom Degtyarev [JB]
05/13/2020, 2:46 PM-lsecur32
?Chilli
05/13/2020, 2:47 PM-lsecur32
thing yet, I'll check it out once I canChilli
05/19/2020, 3:10 PM-lsecur32
option do?Kris Wong
05/19/2020, 3:17 PM