Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors trying to run examples #19

Open
ds604 opened this issue Mar 11, 2023 · 1 comment
Open

Errors trying to run examples #19

ds604 opened this issue Mar 11, 2023 · 1 comment

Comments

@ds604
Copy link

ds604 commented Mar 11, 2023

I'm getting errors trying to run some of the examples. Here are the ones that run correctly and the ones that don't:

  • canvas: no
  • cube: no
  • cursor: yes
  • custom-cursor: no
  • custom-icon: yes
  • events: yes
  • multi-window: yes
  • opengl: no (i'm on a mac, but i put the error below anyway for the sake of completeness)
  • styles: yes (with message "themes not implemented for this system")
  • transparent: yes
  • window: yes

System: MacOS 11.6.8
Deno: 1.31.2

I'm running examples from the links like this:
$ deno run -Ar --unstable https://raw.githubusercontent.com/deno-windowing/dwm/main/examples/canvas.ts

Most examples give this error:

error: Uncaught (in promise) Error: Could not open library: Could not open library: dlopen(/blah/blah/Library/Caches/deno/plug/https/github.com/dde09b5bbcf801e9d3dbb0bf6276f9d048d6643f6b34855bc184ebffa990fd30.dylib, 5): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
  Referenced from: /blah/blah/Library/Caches/deno/plug/https/github.com/dde09b5bbcf801e9d3dbb0bf6276f9d048d6643f6b34855bc184ebffa990fd30.dylib (which was built for Mac OS X 12.6)
  Expected in: /usr/lib/libc++.1.dylib

  return Deno.dlopen(await download(options), symbols);
              ^
    at new DynamicLibrary (ext:deno_ffi/00_ffi.js:415:46)
    at Object.dlopen (ext:deno_ffi/00_ffi.js:545:10)
    at dlopen (https://deno.land/x/[email protected]/mod.ts:145:15)
    at async https://deno.land/x/[email protected]/src/ffi.ts:961:10

imgui error:

error: Uncaught SyntaxError: The requested module '../ext/imgui.ts' does not provide an export named 'CBool'
import { CBool, createContext, destroyContext, imgui } from "../ext/imgui.ts";
         ^
    at <anonymous> (https://raw.githubusercontent.com/deno-windowing/dwm/main/examples/imgui.ts:3:10)

imgui2:

error: Uncaught (in promise) Error: need more work!
      throw Error("need more work!");
            ^
    at getOutFileName (https://raw.githubusercontent.com/djfos/dimgui/main/script/convention.ts:26:13)
    at prepareLibraryFile (https://raw.githubusercontent.com/djfos/dimgui/main/src/ffi.ts:32:38)
    at loadLibrary (https://raw.githubusercontent.com/djfos/dimgui/main/src/ffi.ts:40:30)
    at https://raw.githubusercontent.com/djfos/dimgui/main/src/ffi.ts:56:23

opengl:

GlfwError: 65542 NSGL: OpenGL ES is not available on macOS
error: Uncaught (in promise) Error: Failed to create window
      throw new Error("Failed to create window");
            ^
    at new WindowGlfw (https://raw.githubusercontent.com/deno-windowing/dwm/main/src/platform/glfw/window.ts:674:13)
    at createWindow (https://raw.githubusercontent.com/deno-windowing/dwm/main/src/platform/mod.ts:43:10)
    at https://raw.githubusercontent.com/deno-windowing/dwm/main/examples/opengl.ts:4:16
@sudokit
Copy link

sudokit commented Jan 16, 2024

export function getOutFileName(): string {
  switch (Deno.build.os) {
    case "windows": {
      return "imgui_windows.js";
    }
    case "linux": {
      return "imgui_linux.js";
    }
    default:
      throw Error("need more work!");
  }
}

as you can see, windows and linux have their implementation but other os dont.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants