armory3d / armory3d/armory

emscripten and wasm

Open
#738 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
3.3k
Forks
353
Avg merge
3d 16h
Merged PRs (30d)
1

Description

Hi guys,

I am trying to use emsdk to make wasm from module file (example provided here for C http://armory3d.org/manual/#/code/wasm)

However I am getting this during compilation:
warning: unresolved symbol: get_object
warning: unresolved symbol: set_transform
warning: unresolved symbol: notify_on_update

I am wondering how online wasm studio able to compile it properly.
I also tried this #include "wasm_api.h" and local copy of api definition. The same results.

emscripten: 1.37.14

A cube in browser indeed didn't move with this error in console:
LinkError: import object field 'DYNAMICTOP_PTR' is not a Number

Any guesses/suggestions?

Thank you.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the build with emsdk 1.37.14 using the referenced C module and inspect the local wasm_api.h definition. Compare the generated module with the online WASM Studio result, focusing on the unresolved symbols and DYNAMICTOP_PTR LinkError; done means the cube moves without those compilation or browser errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, wasm
Domain
build-system, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.