ice1000 / jimgui

:sparkling_heart: Pure Java binding for dear-imgui
Apache License 2.0
186 stars 13 forks source link

java.lang.UnsatisfiedLinkError when running `new JImGui()` #82

Closed ghost closed 2 years ago

ghost commented 2 years ago

This is probably something I have done wrong, but I cannot figure it out for the life of me. I am trying to use ImGui in a FabricMC minecraft mod and the game crashes on startup.

Here's the JImGui error:


Caused by: java.lang.UnsatisfiedLinkError: 'long org.ice1000.jimgui.JImGui.allocateNativeObjects(int, int, long, byte[], long)'
    at org.ice1000.jimgui.JImGui.allocateNativeObjects(Native Method)
    at org.ice1000.jimgui.JImGui.<init>(JImGui.java:33)
    at org.ice1000.jimgui.JImGui.<init>(JImGui.java:38)
    at org.ice1000.jimgui.JImGui.<init>(JImGui.java:25)
    at com.wozniak.decaf.screen.ClickGuiScreen.<clinit>(ClickGuiScreen.java:10)
    at com.wozniak.decaf.mod.render.ClickGui.<clinit>(ClickGui.java:10)
    at com.wozniak.decaf.Decaf.onInitialize(Decaf.java:28)
    at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
    ... 12 more```
ice1000 commented 2 years ago

Call JniLoader.load() before new JImGui

ice1000 commented 2 years ago

Oh wow you're from Richmond! My roommate is from Richmond too LOL

ice1000 commented 2 years ago

No response, closing