https://kotlinlang.org logo
Title
j

jkbbwr

03/27/2018, 4:17 PM
Is there a public roadmap anywhere
o

olonho

03/27/2018, 4:50 PM
no public roadmap is currently available
j

jkbbwr

03/27/2018, 5:28 PM
Got a few sneak peak phrases of what might land next? 😉 Im craving a fix
s

Sam

03/27/2018, 6:10 PM
You can always look at the active branches in github to get some idea. https://github.com/JetBrains/kotlin-native/branches/active
n

napperley

03/28/2018, 9:55 PM
Might get some possible hints from the release notes 😄
Been receiving an odd error message from the linker:
/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

olonho

04/02/2018, 9:22 AM
Do you have a
fun main(args: Array<String>)
in your program?
n

napperley

04/02/2018, 9:39 AM
Yes.
Might have something to do with the def file. Below are the contents:
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

olonho

04/02/2018, 10:22 AM
please share your git repo, as it’s hard to guess from provided snippet
a

alexander.gorshenev

04/02/2018, 10:36 AM
@napperley If git repo is not available, we could start with just the compiler command lines or
./gradlew -i
log of the build.
n

napperley

04/03/2018, 12:39 AM
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:
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:
$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

olonho

04/03/2018, 6:49 AM
what about newt .def file?
j

jkbbwr

04/03/2018, 11:56 AM
Can you move this to a different topic? Its unrelated to the original thread
o

olonho

04/03/2018, 12:35 PM
even better create an issue on github or YT
n

napperley

04/04/2018, 3:51 AM
Submitted an issue (https://github.com/JetBrains/kotlin-native/issues/1464) on Github.
👍 1
o

olonho

04/04/2018, 8:35 AM
@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

napperley

04/04/2018, 11:26 PM
That is strange since the previous program I wrote (using ncurses) compiled fine with
fun main(args: Array<String>) = memScoped { ...
.
o

olonho

04/05/2018, 5:29 AM
type of function is inferred, and depends on type of last statement in block, probably before last statement was of Unit type
n

napperley

04/05/2018, 8:27 AM
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).