natario1
05/15/2020, 12:17 AMThe Kotlin/Native distribution used in this build does not provide the standard library.
And soon after, this error which crashes the whole gradle VM:
e: Could not find "stdlib" in [/Users/natario/project-name, /Users/natario/.konan/klib, /Users/natario/.konan/kotlin-native-macos-1.3.72/klib/common, /Users/natario/.konan/kotlin-native-macos-1.3.72/klib/platform/android_arm64].
Does anyone know what this means? I can't see anything relevant in the changelog.Patrick
05/15/2020, 10:38 AM> Task :windows-framework:linkDebugSharedWindows
Produced library API in nimmstaWindows_api.h
e: Compilation failed: The C:\Users\Patrick\.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\Patrick\AppData\Local\Temp\konan_temp6770444008327035466\api.cpp:355:9: error: unknown type name 'nimmstaWindows_kref_com_soywiz_klock_DateTime'; did you mean 'nimmstaWindows_kref_com_soywiz_korio_file_VfsFile'?
nimmstaWindows_kref_com_soywiz_klock_DateTime (*get_dateCreated)(nimmstaWindows_kref_WinNimBuildInfo thiz);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nimmstaWindows_kref_com_soywiz_korio_file_VfsFile
C:\Users\Patrick\AppData\Local\Temp\konan_temp6770444008327035466\api.cpp:242:3: note: 'nimmstaWindows_kref_com_soywiz_korio_file_VfsFile' declared here
} nimmstaWindows_kref_com_soywiz_korio_file_VfsFile;
^
C:\Users\Patrick\AppData\Local\Temp\konan_temp6770444008327035466\api.cpp:1061:8: error: unknown type name 'nimmstaWindows_kref_com_soywiz_klock_DateTime'; did you mean 'nimmstaWindows_kref_com_soywiz_korio_file_VfsFile'?
static nimmstaWindows_kref_com_soywiz_klock_DateTime _konan_function_9_impl(nimmstaWindows_kref_WinNimBuildInfo arg0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nimmstaWindows_kref_com_soywiz_korio_file_VfsFile
C:\Users\Patrick\AppData\Local\Temp\konan_temp6770444008327035466\api.cpp:242:3: note: 'nimmstaWindows_kref_com_soywiz_korio_file_VfsFile' declared here
} nimmstaWindows_kref_com_soywiz_korio_file_VfsFile;
^
C:\Users\Patrick\AppData\Local\Temp\konan_temp6770444008327035466\api.cpp:1067:12: error: unknown type name 'nimmstaWindows_kref_com_soywiz_klock_DateTime'; did you mean 'nimmstaWindows_kref_com_soywiz_korio_file_VfsFile'?
return ((nimmstaWindows_kref_com_soywiz_klock_DateTime){ .pinned = CreateStablePointer(result)});
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nimmstaWindows_kref_com_soywiz_korio_file_VfsFile
C:\Users\Patrick\AppData\Local\Temp\konan_temp6770444008327035466\api.cpp:242:3: note: 'nimmstaWindows_kref_com_soywiz_korio_file_VfsFile' declared here
} nimmstaWindows_kref_com_soywiz_korio_file_VfsFile;
^
3 errors generated.
Any ideas what I need to change? Those are all library classes.aleksey.tomin
05/15/2020, 12:21 PMcom.apple.security.network.client
to true
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_network_clientSourabh Rawat
05/16/2020, 2:26 PMChar.isLetter()
in my common code for multiplatform project. Any help ?Sourabh Rawat
05/16/2020, 4:31 PMgetchar()
from KN ?Rahul Singhal
05/17/2020, 9:32 AMSamyak Jain
05/17/2020, 7:03 PMaleksey.tomin
05/18/2020, 5:54 AMcurl_easy_setopt(curl, CURLOPT_PORT, 443L)
curl_easy_setopt(curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS)
and method POST
fun post(postData: String) {
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headersCRef)
val cstr = postData.cstr
curl_easy_setopt(curl, CURLOPT_POST, 1)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, cstr)
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, cstr.size)
val res = curl_easy_perform(curl)
curl_slist_free_all(headersCRef)
if (res != CURLE_OK) {
throw RuntimeException("curl_easy_perform() failed: ${curl_easy_strerror(res)?.toKString()}")
}
}
But the server accepts wrong data - without some chars (at the start or at the end).
What I do wrong? How it can be fixed?
FIXED:
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, cstr)
->
_curl_easy_setopt_(curl, _CURLOPT_POSTFIELDS_, cstr.getPointer(MemScope()))
vsazel
05/18/2020, 10:03 AMChristian Sousa
05/18/2020, 11:26 AMlet label = UIView()
label.frame.origin.x = ...
I cant seem to find where I can update the x
in kotlin..saket
05/18/2020, 6:10 PMJeff Beyond
05/19/2020, 3:51 PMandroid {
defaultConfig {
externalNativeBuild {
cmake {
abiFilters "arm64-v8a","armeabi-v7a"
}
}
}
externalNativeBuild {
cmake {
path 'CMakeLists.txt'
}
}
}
kotlin {
macosX64(){
}
linuxX64() {
}
}
I got an CONFIGURE FAILED error:
ABIs [armeabi] are not supported for platform. Supported ABIs are [arm64-v8a, armeabi-v7a, x86, x86_64].
My project structure is shown in the attached image, How can I solve it?Slackbot
05/20/2020, 3:47 AMphldavies
05/20/2020, 3:07 PMKweku
05/20/2020, 11:21 PMaleksey.tomin
05/21/2020, 7:49 AMktor-client-core
with ktor-client-curl
(while ktor-client-cio
isn’t redy).
When I build the application I have the error cannot find -lcurl
I’ve added libcurl.a
and libcurl.dll.a
into %HOMEPATH%\.konan\dependencies\curl\lib\
but it isn’t helped.
How can I fix it?Ugi
05/21/2020, 10:32 AMUByteArray
inline class in my project.
linkDebugStaticLinux task fails (rather silently), but running konanc directly with parameters from the task provides the following output (this is just a snippet:
/tmp/konan_temp4669369786604700434/api.cpp:249:216: error: unknown type name 'libmultiplatform_crypto_kref_kotlin_ByteArray'; did you mean 'libmultiplatform_crypto_kref_kotlin_Array'?
libmultiplatform_crypto_kref_kotlin_ByteArray (*digest_)(libmultiplatform_crypto_kref_com_ionspin_kotlin_crypto_hash_StatelessHash thiz, libmultiplatform_crypto_kref_kotlin_ByteArray inputMessage, libmultiplatform_crypto_kref_kotlin_ByteArray key, libmultiplatform_crypto_KInt hashLength);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libmultiplatform_crypto_kref_kotlin_Array
/tmp/konan_temp4669369786604700434/api.cpp:77:3: note: 'libmultiplatform_crypto_kref_kotlin_Array' declared here
} libmultiplatform_crypto_kref_kotlin_Array;
Indicating that libmultiplatform_crypto_kref_kotlin_ByteArray
is unknown, which is somewhat correct because I am using UByteArray.
I worked around this issue by simply declaring one ByteArray in the same class like this
val byteArray: ByteArray = byteArrayOf(0, 1)
And then compilation succeeded.
My question is, is this a known bug, or should I report it?Patrick
05/22/2020, 11:06 AMfun main() {
val str = "123test123"
val matches = Regex("""test""", RegexOption.MULTILINE).matches(str)
println(matches)
}
phldavies
05/22/2020, 1:00 PMNSBundle
for a K/N iOS Framework from within the framework? I’d like to use NSBundle.bundleForClass(ObjCClass)
however this seems to return the Application bundle. If I call Bundle.init(for: ClassFromFramework.self)
in Swift I get the right bundle.Imran/Malic
05/22/2020, 1:26 PMkpgalligan
05/22/2020, 2:04 PMfatal error: module 'AutomaticAssessmentConfiguration' not found
Wondering if anybody’s seen this.Arkadii Ivanov
05/22/2020, 10:37 PMnatario1
05/24/2020, 9:44 PMkotlin.native.ImmutableBlob
is and how to use it?salomonbrys
05/25/2020, 8:54 AMundefined symbol: std::__cxx11::basic_string...
error at linkage.
My library is a C interface to some OpenCV features. I have libopencv-dev
installed on my computer.
Because my C wrapper transforms const char*
into std::string
, I can't compile my it with -D_GLIBCXX_USE_CXX11_ABI=0
(then I get undefined symbol errors on all OpenCV method I use that takes a std::string
because the ABI is different).
The only solution I see is to download and re-compile OpenCV and all its dependencies with -D_GLIBCXX_USE_CXX11_ABI=0
, which is an enormous hassle.
Is there a way to instruct the Kotlin/Native linker to link against the C++11 standard library ?aleksey.tomin
05/26/2020, 5:56 AMGetVersion
, GetSerialNumber
? I have not found these functions.delblanco
05/26/2020, 1:00 PMensureNeverFrozen()
does not generate an exception or not caught on ios?Patrick
05/26/2020, 3:19 PMtypedef float __attribute__ ((__vector_size__ (16))) nimmstaWindows_KVector128;
This is not valid code. Any idea how to fix this other than to manually delete it?Christian Sousa
05/27/2020, 4:27 PMAnaniya
05/27/2020, 6:44 PMSamyak Jain
05/28/2020, 10:42 AM