Thread overview
need help to use Emscripten with LDC to build wasm projects
Aug 22, 2024
Dakota
Aug 22, 2024
Ferhat Kurtulmuş
Aug 22, 2024
monkyyy
Aug 23, 2024
Dakota
Aug 23, 2024
monkyyy
August 22, 2024

Is there a way to link ldc objects with Emscripten to build wasm binary ?

August 22, 2024

On Thursday, 22 August 2024 at 07:28:00 UTC, Dakota wrote:

>

Is there a way to link ldc objects with Emscripten to build wasm binary ?

Some years a go, i was able to build and run my hobby game using EMScripen. Things must be changed now. I drop the link here. I cannot help further since i don't work on it anymore.

https://github.com/aferust/drawee

August 22, 2024

On Thursday, 22 August 2024 at 07:28:00 UTC, Dakota wrote:

>

Is there a way to link ldc objects with Emscripten to build wasm binary ?

yes; you'll have to untangle my build system

https://github.com/crazymonkyyy/raylib-2024

It will always suck tho

August 23, 2024

On Thursday, 22 August 2024 at 21:19:57 UTC, monkyyy wrote:

>

On Thursday, 22 August 2024 at 07:28:00 UTC, Dakota wrote:

>

Is there a way to link ldc objects with Emscripten to build wasm binary ?

yes; you'll have to untangle my build system

https://github.com/crazymonkyyy/raylib-2024

It will always suck tho

Hi Ferhat Kurtulmuş, monkyyy

Thanks for the tips. I will check your both solution.

I try-mtriple=wasm32-emscripten-none with ldc, get this druntime time error.

any suggestions how to fix this?

/ldc/bin/../import/core/stdc/stdio.d(31): Error: module `core.stdc.stdint` import `intptr_t` not found
/ldc/bin/../import/core/stdc/stdio.d(1211): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1216): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1222): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1226): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1228): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1228): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1231): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1233): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1366): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1369): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1378): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1381): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1406): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1408): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1412): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1414): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1435): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1438): Error: undefined identifier `FILE`
/ldc/bin/../import/core/stdc/stdio.d(1440): Error: undefined identifier `FILE`
August 23, 2024

On Friday, 23 August 2024 at 05:50:43 UTC, Dakota wrote:

>

any suggestions how to fix this?

/ldc/bin/../import/core/stdc/stdio.d(31): Error: module ```

I dont use the std with wasm, everything imports everything else and there are just broken symbols deep in "core" that wont be fixed