Is there a public roadmap anywhere
# kotlin-native
j
Is there a public roadmap anywhere
o
no public roadmap is currently available
j
Got a few sneak peak phrases of what might land next? 😉 Im craving a fix
s
You can always look at the active branches in github to get some idea. https://github.com/JetBrains/kotlin-native/branches/active
n
Might get some possible hints from the release notes 😄
Been receiving an odd error message from the linker:
Copy code
/tmp/konan_temp1988559466143815551/combined.o:ld-temp.o:function Konan_start: error: undefined reference to 'EntryPointSelector'
error: could not find 'main' in '<root>' package.
This import causes the linker to fail:
import newt.newtWinMenu
o
Do you have a
fun main(args: Array<String>)
in your program?
n
Yes.
Might have something to do with the def file. Below are the contents:
Copy code
package = newt
headers = popt.h newt.h newt_pr.h nls.h dialogboxes.h
compilerOpts = -std=c99
compilerOpts.linux = -I/home/napperley/newt-0.52.20 -I/usr/include
linkerOpts = -lpopt -lnewt
linkerOpts.linux = -L/home/napperley/newt-0.52.20 -L/usr/lib/x86_64-linux-gnu -lpopt -lnewt
o
please share your git repo, as it’s hard to guess from provided snippet
a
@napperley If git repo is not available, we could start with just the compiler command lines or
./gradlew -i
log of the build.
n
The build was managed via the terminal. This demo program isn't in a Git repo. Please see further details about the program below. 👇
Below is the program:
Copy code
import newt.newtInit
import newt.newtCls
import newt.newtFinished
import newt.newtWaitForKey
import newt.newtDrawRootText
import newt.newtWinMenu
import newt.newtWinMessage

import kotlinx.cinterop.*

fun main(args: Array<String>) = memScoped {
	newtInit()
	newtCls()
	newtDrawRootText(0, 1, "Hello World! :)")

	newtWinMessage(title = "Simple".cstr, text = "This is a simple message window".cstr, 
		buttonText = "Close".cstr)
	val menuItems = arrayOf<CPointer<ByteVar>?>("Item 1".cstr.getPointer(this), "Item 2".cstr.getPointer(this))
	newtWinMenu(
		title = "Choices".cstr, 
		text = "Make your choice".cstr, 
		maxListHeight = 10, 
		suggestedWidth = 50,
		button1 = "Select".cstr,
		items = menuItems.toCValues().getPointer(this),
		listItem = null,
		flexUp = 3,
		flexDown = 3
	)
	newtWaitForKey()
	newtFinished()
}
Here is the full output after compiling the program via Konan:
Copy code
$KOTLIN_NATIVE/bin/konanc -opt -library newt -o newt_demo newt_demo.kt 
/tmp/konan_temp779856219315075082/combined.o:ld-temp.o:function Konan_start: error: undefined reference to 'EntryPointSelector'
error: could not find 'main' in '<root>' package.
error: /home/napperley/.konan/dependencies/target-gcc-toolchain-3-linux-x86-64/x86_64-unknown-linux-gnu/bin/ld.gold invocation reported errors
o
what about newt .def file?
j
Can you move this to a different topic? Its unrelated to the original thread
o
even better create an issue on github or YT
n
👍 1
o
@svyatoslav.scherbina identified your problem, do smth like
fun main(args: Array<String>): Unit = memScoped {
otheriwse your
main
doesn’t match expected main signature
n
That is strange since the previous program I wrote (using ncurses) compiled fine with
fun main(args: Array<String>) = memScoped { ...
.
o
type of function is inferred, and depends on type of last statement in block, probably before last statement was of Unit type
n
Could have easily resolved the issue with having
Unit
as the last line in the
memScoped
block, but that would be a bit weird (not Kotlinic).