Why am I getting weird symbols instead of code?

22 views
Skip to first unread message

Arthuro555

unread,
Oct 18, 2019, 12:30:34 PM10/18/19
to emscripten-discuss
I tried to change some stuff in the codebase of gdevelop (github.com/4ian/GDevelop). It is a JavaScript project that uses a C++ core. I added a mothod to a C++ Class and Tried to get it to the rest in JavaScript, with the default build system that uses EMscripten. But the emscripten generated code is very weird. This is the official precompiled gdevelop c++ file: https://s3.amazonaws.com/gdevelop-gdevelop.js/master/latest/libGD.js  But my version ( I pasted only the first few lines ) looks like this: https://pastebin.com/M8kACk5n . Mine doesn't look like javascript and also doesn't work. Any idea how I can fix this problem? I use the latest version of emscripten, I am on windows, the compiling process uses cmake from an Anaconda env and make from MinGW and nodeJS, and of course emscripten.

Alon Zakai

unread,
Oct 18, 2019, 1:16:52 PM10/18/19
to emscripte...@googlegroups.com
From that ;!<arch> prefix, I think it might be embedding a binary .a file


What may be happening is the build system emits output.a, a library in .a form. To get the emscripten output you need to compile that with emcc, to get js+wasm,


(Btw, is the build system expected to emit a .a library? Is there no main program that the library would be linked with?)

On Fri, Oct 18, 2019 at 9:30 AM Arthuro555 <papin...@gmail.com> wrote:
I tried to change some stuff in the codebase of gdevelop (github.com/4ian/GDevelop). It is a JavaScript project that uses a C++ core. I added a mothod to a C++ Class and Tried to get it to the rest in JavaScript, with the default build system that uses EMscripten. But the emscripten generated code is very weird. This is the official precompiled gdevelop c++ file: https://s3.amazonaws.com/gdevelop-gdevelop.js/master/latest/libGD.js  But my version ( I pasted only the first few lines ) looks like this: https://pastebin.com/M8kACk5n . Mine doesn't look like javascript and also doesn't work. Any idea how I can fix this problem? I use the latest version of emscripten, I am on windows, the compiling process uses cmake from an Anaconda env and make from MinGW and nodeJS, and of course emscripten.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/210320d0-f93b-4634-879a-0e9c0ff5379d%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages