google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.77k stars 1.88k forks source link

Emscripten console loging API has changed since 3.41 #7180

Open MemomiAlexCherkashin opened 1 year ago

MemomiAlexCherkashin commented 1 year ago

From Emscripten change log:

3.1.40 - 05/30/23

  • The _emscripten_out(), _emscripten_err() and _emscripten_dbg() functions declared in emscripten/console.h no longer have the underscore prefix and are now documented. (#19445)

So please make appropriate changes for libs/utils/src/Log.cpp

suzp1984 commented 1 year ago

Yes it is:

Screenshot 2023-09-21 at 8 52 03 PM

But what if the Emscripten version less than 3.1.40? The logging function still has underscore prefix, while after & equal 3.1.40, there are still underscore prefix Legacy/internal name fail back.

MemomiAlexCherkashin commented 1 year ago

you may use macros I guess:

3.1.4

  • The __EMSCRIPTEN_major__, __EMSCRIPTEN_minor__ and __EMSCRIPTEN_tiny__ macros are now available via the emscripten/version.h header file. For the time being, unless you enable -sSTRICT, these are still also defined directly on the command line. If you use these macros please make sure you include emscripten/version.h (or emscripten.h which indirectly includes it). (#16147)