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

Emscripten: error: conflicting types for 'emscripten_set_main_loop' #128

Open
moigagoo opened this issue Dec 17, 2024 · 0 comments
Open

Comments

@moigagoo
Copy link

Trying to build a minimal example for web but getting this error:

CC: main.nim: emcc.bat -c -w -ferror-limit=3 -pthread -O3   -IC:\Users\moigagoo\scoop\apps\nim\current\lib -IC:\Users\moigagoo\Projects\turdsim\src -o C:\Users\moigagoo\Projects\turdsim\tmp\@mmain.nim.c.o C:\Users\moigagoo\Projects\turdsim\tmp\@mmain.nim.c
C:\Users\moigagoo\Projects\turdsim\tmp\@m..@s..@[email protected]@[email protected]@snico@[email protected]:1003:17: error: conflicting
      types for 'emscripten_set_main_loop'
 1003 | N_NIMCALL(void, emscripten_set_main_loop)(tyProc__ln4kdL5W9bbX4a1xl8nnVXQ f_p0, int fps_p1, int simulate_infinite_loop_p2);
      |                 ^
C:\Users\moigagoo\scoop\persist\emscripten\upstream\emscripten\cache\sysroot/include\emscripten/emscripten.h:41:6: note: previous
      declaration is here
   41 | void emscripten_set_main_loop(em_callback_func func, int fps, bool simulate_infinite_loop);
      |      ^
1 error generated.
Error: execution of an external compiler program 'emcc.bat -c -w -ferror-limit=3 -pthread -O3   -IC:\Users\moigagoo\scoop\apps\nim\current\lib -IC:\Users\moigagoo\Projects\turdsim\src -o C:\Users\moigagoo\Projects\turdsim\tmp\@m..@s..@[email protected]@[email protected]@snico@[email protected] C:\Users\moigagoo\Projects\turdsim\tmp\@m..@s..@[email protected]@[email protected]@snico@[email protected]' failed with exit code: 1


stack trace: (most recent call last)
C:\Users\moigagoo\AppData\Local\Temp\nimblecache-7286425919675154353\nimscriptapi_2340658477822456479.nim(187, 16)
C:\Users\moigagoo\Projects\turdsim\turdsim.nimble(32, 2) webrTask
C:\Users\moigagoo\scoop\apps\nim\current\lib\system\nimscript.nim(264, 7) exec
C:\Users\moigagoo\scoop\apps\nim\current\lib\system\nimscript.nim(264, 7) Error: unhandled exception: FAILED: nim c -d:danger -d:emscripten -o:turdsim.html src/main.nim [OSError]
     Error: Exception raised during nimble script execution
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

1 participant