processing-core-4 icon indicating copy to clipboard operation
processing-core-4 copied to clipboard

Cannot resolve native libs: Unsatisfied Link Error

Open BenjaminHolland opened this issue 1 year ago • 2 comments

When running a program using this dependency, the following error occurs at runtime.

java.lang.UnsatisfiedLinkError: Couldn't load library 'nativewindow_awt' generically including (PATH search)

There seems to be a number of unresolved issues around this going back to the mid 201Xs, most of them unresolved. Some of them seem to have been fixed by using the fat version of jogl / glugen like here. I'm not sure if this can be resolved in this artifact or if it needs upstream resolution.

build:

plugins {
    kotlin("jvm") version "1.8.0"
    application
}

group = "land.generic"
version = "1.0-SNAPSHOT"

repositories {

    mavenCentral()
    // <id>jitpack.io</id>
    //  	<url>https://jitpack.io</url>
    maven{
        url = uri("https://jitpack.io")
    }
    maven { url   =uri("https://jogamp.org/deployment/maven") }

}
sourceSets{
    main{
        resources{
           // attempt to add the runtime deps in manually.
            srcDir("...\\jogamp-all-platforms\\jar")

        }
    }
}
dependencies {
    implementation("com.github.micycle1:processing-core-4:4.3.1")
    //implementation("org.processing:core:3.3.6")
    testImplementation(kotlin("test"))
}

tasks.test {
    useJUnitPlatform()
}

kotlin {
    jvmToolchain(17)
}

application {
    mainClass.set("land.generic.processing.MainKt")
}

BenjaminHolland avatar Jun 14 '24 18:06 BenjaminHolland

This is temporarily resolved by downloading JOGL and adding the libs directory to the system path. This seems pretty non-portable, but it does work.

BenjaminHolland avatar Jun 14 '24 18:06 BenjaminHolland

I've just pulled down this artifact with Maven in a fresh installation (note the newest core jitpack version is 4.3.3). Everything works fine. Again it might a Gradle issue.

image

micycle1 avatar Jul 27 '24 10:07 micycle1