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

html version of moai sdk is not working #15

Open
Jackie365 opened this issue Aug 18, 2019 · 0 comments
Open

html version of moai sdk is not working #15

Jackie365 opened this issue Aug 18, 2019 · 0 comments

Comments

@Jackie365
Copy link

After successfully building a linux version of moai sdk, I am trying to build a html host, which is really a hard thing to do.

run build-html.sh first time

In file included from /home/jackie/Desktop/moai/moai-community/sdk/moai/src/zl-util/ZLDeviceTime_posix.cpp:32:
In file included from /home/jackie/Desktop/moai/emsdk/fastcomp/emscripten/system/include/emscripten.h:1:
/home/jackie/Desktop/moai/emsdk/fastcomp/emscripten/system/include/emscripten/emscripten.h:234:25: error: typedef redefinition with
      different types ('struct _IO_FILE' vs 'int')
typedef struct _IO_FILE FILE;
                        ^
/home/jackie/Desktop/moai/moai-community/sdk/moai/src/zl-vfs/zl_replace_stdio.h:23:14: note: expanded from macro 'FILE'
#define FILE ZLFILE
             ^
/home/jackie/Desktop/moai/moai-community/sdk/moai/src/zl-vfs/headers.h:38:13: note: previous definition is here
typedef int ZLFILE;
            ^
1 error generated.

so I change typedef int ZLFILE to typedef FILE ZLFILE and it worked

run build-html again

[100%] Linking CXX static library libmoaishared.bc
[100%] Built target moaishared
Scanning dependencies of target moaijs
shared:ERROR: unclosed quoted string. expected final character to be ''' in ''FS_unmount'\\ '
CMakeFiles/moaijs.dir/build.make:57: recipe for target 'CMakeFiles/moaijs' failed
make[3]: *** [CMakeFiles/moaijs] Error 1
CMakeFiles/Makefile2:133: recipe for target 'CMakeFiles/moaijs.dir/all' failed
make[2]: *** [CMakeFiles/moaijs.dir/all] Error 2
CMakeFiles/Makefile2:140: recipe for target 'CMakeFiles/moaijs.dir/rule' failed
make[1]: *** [CMakeFiles/moaijs.dir/rule] Error 2
Makefile:175: recipe for target 'moaijs' failed
make: *** [moaijs] Error 2

so I deleted the space after the FS_unmount in file cmake/hosts/host-html/CMakeLists.txt

and run it again, I got shared:ERROR: undefined exported function: "_AKURunScript"
so I deleted _AKURunScript and repeat the process until it finally builds

I have run pito host run html successfully, but the webplayer is not working at all. My browser gives me error message like TypeError: Module.cwrap is not a function

Thank you!

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