Chilli
04/30/2020, 4:07 PMresource
folder from Kotlin/Native? Everything in the internet I found uses javaClass.getResource
which is obviously not available in Native...Chilli
04/30/2020, 9:40 PM@konan.ThreadLocal
but I have no idea what's its package — it gives me Unresolved reference
Chilli
04/30/2020, 11:54 PM@ExperimentalUnsignedTypes
requirement?natario1
05/01/2020, 1:32 PMKavan
05/01/2020, 4:03 PMcreateThread {
val woeid = WeatherAPI.queryLocation("Toronto")
val weekForcast = WeatherAPI.getWeatherInfo(woeid.get(0).woeid)
val todayInfo = weekForcast.get(0)
gtk_ideal {
gtk_label_set_text(gtk_builder_get_object(builder, "the_temp")?.reinterpret(), "${todayInfo.currentTemp.toInt()}°")
gtk_label_set_text(gtk_builder_get_object(builder, "day_place")?.reinterpret(), "${todayInfo.dayOfWeek} - ${woeid.get(0).name}")
gtk_label_set_text(gtk_builder_get_object(builder, "weather_state_name")?.reinterpret(), "${todayInfo.weatherState}")
gtk_label_set_text(gtk_builder_get_object(builder, "more_detailed")?.reinterpret(), "High: ${todayInfo.maxTemp.toInt()}° Low: ${todayInfo.minTemp.toInt()}° Precip: 0%")
val weekGridView = gtk_builder_get_object(builder, "week_detail_grid")
weekForcast.drop(1).forEachIndexed { index, dayInfo ->
gtk_grid_attach(weekGridView?.reinterpret(), createElement(dayInfo.dayOfWeek.substring(0,3), dayInfo.weatherStateAbbr, dayInfo.maxTemp.toInt().toString(), dayInfo.minTemp.toInt().toString())?.reinterpret(), index, 0, 1, 1)
}
gtk_widget_show_all(weekGridView?.reinterpret())
}
}
Rahul Singhal
05/01/2020, 4:10 PM<attr name="onClick" format="string" />
android:onClick="@{() -> onClickEvent.invoke()}"
Please help me to understand how onClick accept the lamda function . how this () -> onClickEvent.invoke() convert to stringChilli
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?Sean Keane
05/01/2020, 5:24 PMKotlin subclass of Objective C class can't be imported
For this class
@ExportObjCClass
public class MyView: UIView {
private val helloWorldLabel = UILabel()
@OverrideInit
constructor(coder: NSCoder) : super(coder)
@OverrideInit
public constructor(frame: CValue<CGRect>) : super(frame) {
helloWorldLabel.apply {
text = "Hello World"
translatesAutoresizingMaskIntoConstraints = false
}
NSLayoutConstraint.activateConstraints(
listOf(
helloWorldLabel.centerXAnchor.constraintEqualToAnchor(this.centerXAnchor),
helloWorldLabel.centerYAnchor.constraintEqualToAnchor(this.centerYAnchor)
)
)
this.addSubview(this.helloWorldLabel)
}
@ObjCAction
fun layoutSubviews() {
}
}
natario1
05/01/2020, 8:38 PMextern "C"
?louiscad
05/01/2020, 10:07 PMCould not GET '<https://download-cf.jetbrains.com/kotlin/native/builds/releases/1.3.72/macos/kotlin-native-macos-6.1.tar.gz>'. Received status code 403 from server: Forbidden
Am I the only one to experience it?
EDIT: Same issue with Kotlin 1.4-M1:
Could not GET '<https://download-cf.jetbrains.com/kotlin/native/builds/releases/1.4-M1/macos/kotlin-native-macos-6.1.tar.gz>'. Received status code 403 from server: Forbidden
I'm completely blocked, so I'll be very grateful for help.jdiaz
05/02/2020, 7:09 PMBefore:
linkerOpts.linux = -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu -lgit2
After:
linkerOpts.linux = -L/usr/lib64 -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu -lgit2
And I can see it in ldconfig -v | grep -C3 libgit
(libgit2.so.1.0 -> libgit2.so.1.0.0). What am I missing?Nick Williams
05/03/2020, 6:37 PMiosTest
target? Im getting an error ld: framework not found FirebaseCore
in the task linkDebugTestIos
Hauke Radtki
05/04/2020, 6:30 PMInvalidMutabilityException: mutation attempt of frozen kotlinx.coroutines.sync.MutexImpl.LockedQueue
when accessed from two different threads, even though the documentation states:
All core communication and synchronization objects inAnyone experienced this?such as Job, Deferred, Channel, BroadcastChannel, Mutex, and Semaphore are shareable. It means that they can be frozen for sharing with another thread and still continue to operate normally.kotlin.coroutines
yk_nb
05/05/2020, 7:07 AMPatrick
05/05/2020, 8:55 AMPrateek Grover
05/05/2020, 2:53 PMKris Wong
05/05/2020, 3:19 PM@import Module
?Andrey Gromov
05/05/2020, 8:35 PM@PrintName("name")
class SomeClass{...}
It must print "name" on build phase.
I reviewed tons of articles and examples, spent three days with <https://github.com/Foso/MpApt>
and achieve nothing.
Maybe you can point me to simple working example? I need only K/N, not mpp.jdiaz
05/05/2020, 10:28 PM.konan/dependencies/clang-llvm-8.0.0-linux-x86-64/bin/ld.lld invocation reported errors
? it happens in linux and not in macOsmbonnin
05/05/2020, 10:35 PMDEBUG=non-optimized with debug info
or RELEASE=optimized without debug info
). I feel like having dSYM could still help symbolicate stacktraces but maybe I'm wrong ?ZabGo
05/06/2020, 9:09 AMUndefined symbols for architecture x86_64
I am not really sure about the right way to link this framework.
I tried to add the headers of this framework to compilerOpts
as well but it did not change anything.
Is there anything I need to change or add in the def file or build.gradle?
For now the linkerOpts looks like that in my def file:
linkerOpts= \
-F/absolute/path/to/MyFramework.framework \
-framework AVFoundation \
-framework Foundation \
-framework CoreGraphics \
-framework CoreVideo \
-framework QuartzCore \
-framework UIKit \
-framework CoreLocation \
-framework Security \
-framework CFNetwork \
-framework CoreMedia \
-framework SystemConfiguration \
-framework AudioToolbox
in my build.gradle
iosX64("ios") {
binaries {
framework('Shared'){
linkerOpts "-F/absolute/path/to/MyFramework.framework"
}
}
compilations.main {
cinterops {
myCinterop {
linkerOpts "-F/absolute/path/to/MyFramework.framework"
}
}
}
Nuno Vieira
05/06/2020, 12:40 PMUIWebView
and we found that the generated KMP Binary was the cause. We did include third party binaries that was using this inside the KMP Binary. We removed them, but still when using nm
on the Generated KMP Binary, it still finds references to UIWebViewDelegate
.000000000065d1d8 s __OBJC_LABEL_PROTOCOL_$_UIWebViewDelegate
00000000006c6010 d __OBJC_PROTOCOL_$_UIWebViewDelegate
rattenkonig
05/06/2020, 1:34 PMstaticLibraries.targetName = path/to/static/lib
(i.e. mac_x64) but that didn’t work out, ld reported that Undefined symbols for architecture x86_64
. Without specification of target everything compiles, but I need to link that library on several platform and kinda don’t want to create cinterop file for each targetaleksey.tomin
05/07/2020, 3:23 AMkotlin-gradle-plugin
has got macosX64
and linuxX64
function (kotlin-gradle-plugin-1.3.70-sources.jar!/org/jetbrains/kotlin/gradle/dsl/KotlinTargetContainerWithPresetFunctions.kt:353) but I haven’t found windows
. Can I make windows application?Andrey Gromov
05/07/2020, 2:41 PM.def
file to klib
with header file included. This header contains other includes.
# cat myext.def
headers = somepath\somelib.h
# cinterop -def myext.def -o myext
error: 'someOther.h' file not found with <angled> include; use "quotes" instead
It's third party headers and I can't change them. How to resolve this without adding those headers into def
in right order?aleksey.tomin
05/13/2020, 6:47 AMapp.kexe
for macos. And I try to run it on another computer. Result - dyld: Library not loaded: /usr/local/opt/libmicrohttpd/lib/libmicrohttpd.12.dylib
1. May be put library into kexe? How I can do it?
2. May be create macos installer? How I can do it?magnumrocha
05/13/2020, 4:50 PMNSError
for a kotlin native Throwable
?adk
05/13/2020, 8:51 PMKavan
05/14/2020, 5:00 AMChristian Sousa
05/14/2020, 11:53 AMsetTitleTextAttributes(attributes = mapOf(UIColor.whiteColor to "foregroundColor"), forState = UIControlStateSelected)
foregroundColor
, backgroundColor
and textColor
but none worked.Christian Sousa
05/14/2020, 11:53 AMsetTitleTextAttributes(attributes = mapOf(UIColor.whiteColor to "foregroundColor"), forState = UIControlStateSelected)
foregroundColor
, backgroundColor
and textColor
but none worked.Artyom Degtyarev [JB]
05/14/2020, 1:28 PMChristian Sousa
05/14/2020, 1:42 PMmapOf
the other way around. It should be:
setTitleTextAttributes(attributes = mapOf("foregroundColor" to UIColor.whiteColor), forState = UIControlStateSelected)