I have been trying to follow this blog and I have run all the steps successfully but however when I run the last command
create table C as
select A.code || '-' || B.year as status
from A, B
I get errors which say sqrt,pow,fopen,fclose are all unresolved
konanc $COMPILER_ARGS -target macbook src/main/kotlin/logogen.kt -library build/c_interop/png -linkerOpts "-L/usr/local/lib -lpng" -o build/bin/logogen
This is what is in my png.def file
error: unresolved reference: sqrt
Imported it in my logogen.kt file as
headers = /usr/local/include/png.h stdio.h stdlib.h string.h math.h
Thank you!
答案 0 :(得分:1)
compilerOpts = -lm
可以解决问题。
答案 1 :(得分:0)
你在用$COMPILER_ARGS
代替什么?大概你传递了那些定义那些C引用的C库,以及程序所需的C库。例如,对于sqrt undefined reference you would add '-lm'。对于编译器告诉您缺少的任何其他内容也是如此。