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




_______________________________________________
Qbs mailing list
[email protected]
https://lists.qt-project.org/listinfo/qbs

Reply via email to