Open
Description
I'm not too sure on what I'm doing wrong here, and I don't know how to find the "dependent libraries", I have followed all of the steps ):
"C:\Program Files\Java\jdk-21\bin\java.exe" --enable-preview --enable-native-access=ALL-UNNAMED "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.2.3\lib\idea_rt.jar=51338" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath C:\Users\woodr\Development\luau\build\classes\kotlin\main;C:\Users\woodr\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\2.1.10\d3028429e7151d7a7c1a0d63a4f60eac86a87b91\kotlin-stdlib-2.1.10.jar;C:\Users\woodr\.gradle\caches\modules-2\files-2.1\dev.hollowcube\luau\0.1.0\beb6354f5b79be9a33c04d27986b3ef280b4735e\luau-0.1.0.jar;C:\Users\woodr\.gradle\caches\modules-2\files-2.1\dev.hollowcube\luau-natives-windows-x64\0.1.0\83b28053947a244df90d58a3f0d10d8454ce225b\luau-natives-windows-x64-0.1.0.jar;C:\Users\woodr\.gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\24.1.0\7af6a669488450c4a07c2c3254e2151df42d7d04\annotations-24.1.0.jar HelloWorld
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\woodr\AppData\Local\Temp\luau-natives15761671978458322197\compiler.dll: Can't find dependent libraries
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418)
at java.base/java.lang.Runtime.load0(Runtime.java:852)
at java.base/java.lang.System.load(System.java:2025)
at net.hollowcube.luau.util.NativeLibraryLoader.loadEmbeddedLibrary(NativeLibraryLoader.java:45)
at net.hollowcube.luau.util.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:16)
at net.hollowcube.luau.compiler.LuauCompilerImpl.<clinit>(LuauCompilerImpl.java:30)
at net.hollowcube.luau.compiler.LuauCompilerImpl$BuilderImpl.build(LuauCompilerImpl.java:153)
at net.hollowcube.luau.compiler.LuauCompiler.<clinit>(LuauCompiler.java:12)
at HelloWorld.main(Main.kt:10)
import net.hollowcube.luau.LuaState
import net.hollowcube.luau.compiler.LuauCompileException
import net.hollowcube.luau.compiler.LuauCompiler
object HelloWorld {
@Throws(LuauCompileException::class)
@JvmStatic
fun main(args: Array<String>) {
val bytecode = LuauCompiler.DEFAULT.compile(
"""
print("Hello, Luau!")
""".trimIndent()
)
val state = LuaState.newState()
try {
state.openLibs() // Open all libraries
state.sandbox() // Sandbox the global state so it cannot be edited by a script
val thread = state.newThread()
thread.sandboxThread() // Create a mutable global env for scripts to use
thread.load("helloworld.luau", bytecode) // Load the script into the VM
thread.pcall(0, 0) // Eval the script
state.pop(1) // Pop the thread off the stack
} finally {
// Always remember to close the state when you're done with it, or you will leak memory.
state.close()
}
}
}
and here is my dependencies
dependencies {
implementation("dev.hollowcube:luau:0.1.0")
implementation("dev.hollowcube:luau-natives-windows-x64:0.1.0")
}
Metadata
Metadata
Assignees
Labels
No labels