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

"missing declaration for emcc$export$dynCall_vi" if use SDL_Init(...) since emsdk 2.0.16 #782

Closed
PowerNow opened this issue Apr 2, 2021 · 3 comments · Fixed by emscripten-core/emscripten#13834

Comments

@PowerNow
Copy link

PowerNow commented Apr 2, 2021

Hi, since I updated from emsdk 2.0.1 to 2.0.16 on Win10 I'm getting during compilation the warning:
metadce: missing declaration for emcc$export$dynCall_vi

The reason is SDL_INIT(). I tried it with SDL_INIT_VIDEO and SDL_INIT_EVERYTHING.

int main() {
    SDL_Init(SDL_INIT_VIDEO);
    return 0;
}

My emcc command is
emcc -s main.cpp C:\Programs\glm-0.9.9.8\glm -lidbfs.js -s INITIAL_MEMORY=128MB -s ALLOW_MEMORY_GROWTH=1 -s USE_SDL=2 -s USE_SDL_TTF=2 -s USE_ZLIB=1 -s MIN_WEBGL_VERSION=2 -s MAX_WEBGL_VERSION=2 -s FETCH=1 -s EXPORTED_FUNCTIONS="['_main']" -s NO_EXIT_RUNTIME=1 -s EXTRA_EXPORTED_RUNTIME_METHODS="['cwrap']" -O3

What can be the reason for that? Thks...

@kripken
Copy link
Member

kripken commented Apr 6, 2021

That warning is safe to ignore.

I believe the underlying issue is that SDL2 has dynCall("vi" ..) or dynCall_vi(..) calls, but there is no function with the signature vi. So that code will never be reached, but metadce doesn't know that.

I don't think it's practical to make that warning 100% precise, and it hasn't been useful, so perhaps we should just remove it.

@PowerNow
Copy link
Author

PowerNow commented Apr 6, 2021

Will this issue be solved in the next emscripten version 2.0.17 or can I self somehow remove this warning?

@kripken
Copy link
Member

kripken commented Apr 6, 2021

emscripten-core/emscripten#13834 should fix this. Until then you can modify the code manually (there is no flag for it).

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

Successfully merging a pull request may close this issue.

2 participants