[Qbs] Problem with setting of driverLinkerFlags “-sEXPORTED_RUNTIME_METHODS”
Maksym Lykhovych
maksym.lykhovych at bee360.com
Fri Feb 27 15:11:57 CET 2026
Hi,
I have a problem with the setting of a driverLinkerFlags “-sEXPORTED_RUNTIME_METHODS”.
Context: I build an app with a WebAssembly-Multithread-Kit, but have the problem that my qtloader.js, which is created by Qt and loads the content to the website, uses a function called callMain. But I got an error when I tried to run my app, saying that this function isn’t exported, and I should add it to the -sEXPORTED_RUNTIME_METHODS. When I added the flag with this function in my .qbs file of my project, it turned out that my command was ignored, because this flag is defined after my definition again, and it overrides my flag. I found out that the flag is defined the second time in “core.qbs” and, of course, without callMain. Although the file is generated, there is still an option to adjust the flag in this core.qbs and put this adjusted file in the project and add to qbsSearchPaths as a first path. So that adjusted version of core.qbs will be noticed at first and then will be used . However, it is not advisable to adjust the Qt Module.
So, I don’t know why callMain is not added to “-sEXPORTED_RUNTIME_METHODS”, when it is used in the generated qtloader.js and why there is no option to add or adjust the flag normally without these tricky workarounds.
Is there maybe a flag like “-sADDITIONAL_EXPORTED_RUNTIME_METHODS”, would be fine.
Is there anyone else who has had this problem?
Best regards,
Maksym Lykhovych
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20260227/64248fc3/attachment.htm>
More information about the Qbs
mailing list