question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't import uno.glfw.GlfwWindow

See original GitHub issue

Looks like I’m experiencing the same issue as #101, but am using gradle to pull imgui dependencies in. IntelliJ, or gradle while building - can resolve references to most imgui classes (e.g. import imgui.ImGui; works fine). However, uno.glfw.GlfwWindow just doesn’t seem to exist, even though IntelliJ lists it in the dependencies just fine, and can even view its (decompiled) source code.

The build.gradle I’m using to reproduce this problem looks like this:

plugins {
   id 'java'
}

repositories {
   mavenCentral()
   maven { url 'https://jitpack.io' }
}

dependencies {
   compile 'com.github.kotlin-graphics:imgui:-SNAPSHOT'
}

The problem also persists with the more complete build.gradle listed on the wiki or in the README.

In an editor references to GlfwWindow cannot be resolved, but ImGui can: image

Running gradle’s build task, it insists uno.glfw does not exist: image

In the ‘External Libraries’ listing, the class is listed (and can be viewed without error): image

These results are produced using java version:

openjdk 11.0.5 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10)
OpenJDK 64-Bit Server VM (build 11.0.5+10, mixed mode)

If I switch to OpenJDK 8, gradle will fail even before an error for GlfwWindow, producing the following error:

/home/ridan/IdeaProjects/imguitest/src/main/java/Main.java:1: error: cannot access ImGui
import imgui.ImGui;
            ^
  bad class file: /home/ridan/.gradle/caches/modules-2/files-2.1/com.github.kotlin-graphics.imgui/imgui-core/-SNAPSHOT/55853bf32a87b9129ac7c136ca312354dc2083e2/imgui-core--SNAPSHOT.jar(imgui/ImGui.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

However, If I use the jdk8 branch(es) made by @AlexApps99, the issue persists like it did with JDK 11.

Edit: any references to the uno package don’t work.

If you need any more information, just ask. Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
zeroeightysixcommented, Dec 19, 2019

Okay, will do. Thanks for the help (and the amazing libraries)!

0reactions
elect86commented, Sep 17, 2020

this should be solved

Read more comments on GitHub >

github_iconTop Results From Across the Web

Window guide - GLFW
GLFW_FLOATING specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top.
Read more >
GLFW error - GLFWwindow* not recognized as valid argument
It seems that Eclipse can't read or find out the function properly. Invalid arguments ' Candidates are: void glfwMakeContextCurrent(*) '.
Read more >
Python Examples of glfw.destroy_window - ProgramCreek.com
This page shows Python examples of glfw.destroy_window. ... import MjViewer import glfw except ImportError: # If we can't import mujoco_py, we must not...
Read more >
Modern OpenGL programming in Python - part 02 - YouTube
Initializing the GLFW library and creating a GLFW window and set its context to OpenGL. ... Your browser can't play this video.
Read more >
Source code for moderngl_window.context.glfw.window
Source code for moderngl_window.context.glfw.window. from typing import Tuple import glfw from PIL import Image from moderngl_window.context.base import ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found