Hi,
I've searched in the documentation and a few pages here how to solve my issues, without luck.
First, I have an issue when running any example, it compiles, open a browers and says :
- Qt for WebAssembly: [project]
Application exit (RuntimeError: Aborted('specialHTMLTargets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)))
Did not find what causes this in the FAQ, and even ChatGPT lied to me.
Example, a very simple hello world program :
#include <QApplication>
#include <QPushButton>
#include <QTranslator>
int main(int argc, char *argv[])
{
if (!translator.load("hellotr_la"))
return 1;
app.installTranslator(&translator);
hello.resize(100, 30);
hello.show();
return app.exec();
}
#include <QApplication>
#include <QPushButton>
#include <QTranslator>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QTranslator translator;
if (!translator.load("hellotr_la"))
return 1;
app.installTranslator(&translator);
QPushButton hello(QPushButton::tr("Hello world!"));
hello.resize(100, 30);
hello.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Second issue is linking libraries such as opencv, it says the .dll built with mingw are "unknown file type"
wasm-ld: error: unknown file type: C:/Dev/opencv/mingw-build/bin/libopencv_calib3d460.dll
Thanks for any help !
Bookmarks