Skip to content

Building the library with emscripten (emcmake) for create a .wasm file, from a .cpp file that use opendht.h  #728

@douglas-martins

Description

@douglas-martins

Hi guys, i'm trying to build this library to use with Webassembly (using emcc Emscripten to build the .wasm file) but i'm really lost on how can i do that.

When i try to build using emcmake, i always has this error that can not find the msgpack, nettle and gnutls libraries (even if i have this libaries installed in my system). But when i follow the build tutorial from this repository, everything works fine. I understand that i can not build like cmake and after that use the emmake to generate the libopendht.a file, because when i do that i still facing errors when i try to compile my cpp code with the opendht, normally for others libraries used from opendht, like stdint.h or bits.

Is very confusing, because i need to point where is my .a file and my .h for opendht when i try to build my .wasm file, but the 2 thinks is not working together.

Can someone point me out some guide/tutorial for doing that?

Thanks! 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions