emscripten-core / emscripten-core/emscripten

GLFW.cursorPosFunc (no such functions have gotten exported)

Open
#21,886 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

```js
if (GLFW.active.cursorPosFunc) {
((a1, a2, a3) => { throw 'Internal Error! Attempted to invoke wasm function pointer with signature "vidd", but no such functions have gotten exported!' })(GLFW.active.id, Browser.mouseX, Browser.mouseY);
}
```
I'm sort of lost here, I can register glfwSetCharCallback and other callbacks work fine,
all callback functions are declared exactly the same way, and yet that 'throw' code is being generated specifically for the glfwSetCursorPosCallback.

This happens when building a side module:

I tried the following flags:
-sSIDE_MODULE=1
-sUSE_GLFW=3
-sEXPORT_ALL
-sLINKABLE

The callbacks and the glfw functions are in a library which is linked to the side module,
the code loads the side module at runtime.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.