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

GLFW.cursorPosFunc (no such functions have gotten exported) #21886

Open
MicroRJ opened this issue May 2, 2024 · 2 comments
Open

GLFW.cursorPosFunc (no such functions have gotten exported) #21886

MicroRJ opened this issue May 2, 2024 · 2 comments

Comments

@MicroRJ
Copy link

MicroRJ commented May 2, 2024

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.

@sbc100
Copy link
Collaborator

sbc100 commented May 3, 2024

You don't need -sEXPORT_ALL or -sLINKABLE when building a side module. Can you see if removing those flags fixes the issue?

@sbc100
Copy link
Collaborator

sbc100 commented May 3, 2024

Note that when you build side module there is no .js that gets generated, the .js file is built when you build the main module. What are the flags you are using when you build the main module?

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