micycle1 / processing-core-4

Processing 4 core as a Maven artifact via JitPack
35 stars 10 forks source link

Cannot resolve native libs: Unsatisfied Link Error #13

Open BenjaminHolland opened 2 months ago

BenjaminHolland commented 2 months ago

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 commented 2 months ago

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.

micycle1 commented 3 weeks ago

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