There is a library called QtWebApp which allows you to set up a server and it is pretty good for small-medium projects. t has examples and a great tutorial on the official site there.
I don't really know how Angular works and I've never tried it so tell me if this is what you needed or not.
That is indeed the issue. I went to the wrong directory choosing the opensource version (with the old installer etc. ...).
I'm donwloading and can even download Webassembly.
Thanks for your help!!!
@lorn-potter For the notes app I'm thinking I want to have a page with three buttons with C++ functions connected to them where the first would add a textarea along with a button to save a note and a button to delete a note; the second one to let the user delete a note (works the same as the aforementioned one: shows a list of notes in a modal dialog box where the user can select one or more (adjacent) notes and delete them); and the third to browse notes (of course if the user decides he/she delete a note from the list while browsing, he/she should be able to do so).
@tham said in Is Qt for webassembly die?:
@sierdzio said in Is Qt for webassembly die?:
You are not paying enough attention to fixing bugs. There are bugs literally from BC. I think adding new features should not be your first priority, fixing bugs and maintaining stability should be.
Hyperbole not withstanding, both features and bug fixes are ranked by developers/management on criticality.
Qt Widgets is totally abandoned for years (along with all the other Desktop support). Not enough modern and updated widgets there.
~/depot/qt/qt5/qtbase $ [5.15]> git log --pretty=oneline --no-merges --graph v5.14.0-alpha1...v5.14.1 src/widgets/
7a59d6f138ff8799170cc03d709525ab965d703a Doc: Correct non-link related qdoc compilation errors
99b396631999d7fc4e5e95b90a83858a5cb5a941 Doc: Add note about mac-specific behavior for setWindowIcon
9dcbf2cf5cbdfe35637ff323fd44729badaae811 QScrollBar: allow scrolling any scrollbar with any mouse wheel
1e42c97cf055ac20352d20150e2786c14565ea2b Bump copyright year
7b092b3fe3c9960a2e2866a3b03818fe63bbbac4 Remove clearWidgetPaletteHash argument from setPalette_helper
2a02487ff00341fcc07023b37ec527c2694fa4c1 Move tracking of widget specific app palettes to QApplicationPrivate
0c37bc11b5f379d442ed3475483d57449b63963d Share updates to QGuiApplicationPrivate::app_pal via helper function
22942058aa9c83acb809d0d4c6b78d29a3c33e12 Doc: Correct qdoc compilation errors qtbase
5af73cd9db52da287070cede300295b90f7ced67 Skip WA_DontShowOnScreen widgets when checking whether application can quit
78d2a04a01dbb989c017843f9d6d1f0c485c0e86 QSystemTrayIcon: Fix geometry() to work with scaling enabled
5b22d1719881b5f061be6b832a96a1e4305d981f Fix some issues of a clang-cl developer build
56674dca36f113369d3ed598192a392ceb723605 QSS/QComboBox: set correct palette when drawing SC_ComboBoxArrow
c62333424839b3229706a6ebb64ba271689a3b8c QPlainTextEdit: make sure firstVisibleBlock() is valid
240a8514f84e9be116acb34991b12a7aa2279914 Fix syncqt warning in qtestsupport_widgets.h
a6f56251ca6090cb0ba4c4989d7ccc638b1dbe2b Fix some qdoc warnings
4b1d370f755578f60bd9c73ca98eeb8e71463caf Check platformNativeInterface pointer before dereferencing
411c2e3e4f32ab98bab65bcd53faf11da3c4efd0 QCommonStyle: make sure to pass the widget to pixelMetric()
e0b9beb63dead017b6849ebcaa91c04a57f955c6 QFileInfoGatherer: don't pass empty list to QFileSystemWatcher
761025d08c32f3dddbd2d32f00b71f6411dd40ce Contain Qt::AA_SetPalette logic in QApplicationPrivate::setPalette_helper
c7ecff04609dd7d9282fa5de3d5d1e1fd189b4cb Simplify QApplication::palette
a132e0254005b2954b11705b32650c9018049187 Fix QAccessibleWidget::focusChild() to return focused descendant
0a09a6341ddff4397461deb98b8d7a28ca3c9dca Sync implementation of QGuiApplication and QApplication setPalette
04f5008f51dee9feec68afcee8cd8314b8e5ac62 Let sendApplicationPaletteChange() decide when it needs to exit early
df69364469c6816dab0f364f0687946a8d566679 Remove QApplicationPrivate::set_pal
da0e7457523a5c6867c2d9b9f0346167738f0323 Explicitly polish palette instead of relying on QApplication::setPalette
96d1d44279dc582355c21956fee99d945888fb07 Clean up QApplication::style default style construction
a9e628e7ec6b9d5bb38e64b7129c68320322033b Ensure override style properly clears out previous style if set
f6a2b81eabae81110f678263be8558c24072c458 Update system palette on application init if needed
6b06f12da6d5171d02764e9d6636c59731e2289f Unify system palette initialization during style change
14071b5a8e15b1f9ce0bf601a96ae365fa8983aa Clarify call to initializeWidgetFontHash in QApplication::setStyle
5a660353edde7b9f382ee41ecf278fc4537f38fa Doc: Fix qdoc compilation errors qtbase
382f1a221b353892844dc7b1495741c4669955e7 wasm: fix getOpenFileContent doc
e40e82ede1660e6467291002862732a536558f08 Add "checkable" state to accessible menu item
03dc30acca4976c716c723ff46d503d35459b2a0 Fix QPushButton style sheet style for overlay (content) image
c27123d7435e9451f3e44d9e823734e605279d0a QAbstractItemView: add a note about ToolTipRole in dataChanged()
46d21a3b34c2d252db14419a45957991acea949d QPushButton: fix icon + text layouting in RTL mode
baed8534bc1dac36a9d0ef4240fc14398076a192 Move the tooltip out of the way of very large mouse cursors
5272c35073aefee01751647dfb265aa3abf49823 Doc: Clarify ownership of added menu for QMenuBar::addMenu(QMenu *)
8339ce2155752eb8fa0f49f3fe4b24f9643ae463 Avoid crash in menu that was previously shown as submenu
009abcd7b66738bece6cf354776dfb2ef401636b QWidget: React to platform surface being created or destroyed
29adc0eed9b9dc3cce92f8acaaeaed3ab1bc6414 Fix updating the text cursor position after editing
ca7033935a26e2a11c7d872a6673e828eddf49ca Tell the truth about QDateTimeEdit's range-of-values properties
da94625f38692365217b4647dd721fa5ea14c6ff Fix sizeHint of QProgressDialog to have enough space for window margins
20266820a31d5cd4afc808bc8b3e9eb6e0396358 Item views: do not clip items horizontally in dragging icon
97ac281c1d70dcfbb137e5a83e24a747e9510116 QStyleSheetStyle: properly honor checkmark size when drawing a QMenu
925b33bdaabc7d07d6910d5696af1ff49287d8fa QPlainTextEdit: update internal palette on QEvent::EnabledChange
985f4910249a0308b746695e64aa1a6205492421 QTreeView: Reset the pressed index if the decoration was pressed on
4422a9bd88602c8dfde8648ad39692d968295cfc QWidget: don't set WA_PendingMoveEvent when geometry does not change
cd3585ab159c3d0614f418fd148b7cea77ea6d12 QDial: use correct button color
da0af1e21de6eda849dacf0283c78fbd36fd4f3f Doc: Improve explanation of QLineEdit input mask
54d5ca0c2766e915c960fa437cee6c20a324c1a7 Doc: improve Using Model Indexes in Model View Programming guide
9f48f1ebc21f783cd8bb7daab942d70aebf085bc QLineEdit: Fix End key for input masks
c15a069830baf87f57c84e86326cf86ba9a39713 QTreeView: make sure to not ask the old model during setModel
51cbd5288c85cb4de382cb23d6f5559c2b626126 Fix rendering of markdown in QLabel
aef07a433f16f5ed3800ee60e11116f78f13d3c4 QTableWidget: Fix -Wdeprecated-copy warning
f54e97726f36c56d9f51f2243493c55ab8cf7bef Doc: Add notes about Qt Style Sheets taking precedence
ccd3bf0871b81dfc09bb469b161f32dfb47ee53e Ensure that child windows are visible again when showing their parent
| * 88047be4ecb99799f4876ff3e7001abe34ac29bc QAbstractItemView: don't toggle selection on mouse move on some index
| * 0ae489053a9fafeb45f6de4431ed7b7ea992b8f8 Turn a local QHash into a QMultiHash
31a971f727ecf0c6651689f052b9fb4c67872b58 QColorDialog: Fix memory leak when picking screen colors
| * 5b22dc71a3eaa70fc2ae14ba950c8d897ef3cd6a QGraphicsItem: disable deprecated warnings during compilation
| * 265b25a5c36a938ca13c016a09caf9fb9384e408 Specify year in month name lookups for QCalendarWidget
| * 5edf34848a51c7678031aeb9576b8f3b7b5fceab QTableView: properly deselect row when column 0 is hidden/not visible
365f70be6ed53bf8b9ba7c5a78d5683e4ff8fe79 Doc: Correct snippet about customizing QMenuBar
31012df705c37503be00f0ddc2c323e73fd28067 Fix QGraphicsScene::update() performance
3dbc7596a3b7aca37e80f76288d3ab761ddd247a Drag'n'Drop: fix crash when widgets are destroyed during event handling
d2ae838a7c6a49eb826ddf8de115306d11dd4d30 Item views: fix regression causing unexpected widget overlapping
| * d71dbe3e9322430dceed9cb2d3f957fbac2ab715 docs: clarify usage of css 'qproperty' in stylesheets
| * 1b6db1849477be30ef0ca52c288d358b911ea1e4 Propagate application termination requests through QPA
| * e5c003b77ddd9830805124ab829067a7858bf024 Set icon on the select-all action in the text edit context menu too
| * 9cc040a806fd2e6f1458e801a99311168d594c77 Prepare for deprecating the QDesktopWidget
| * 95ac2072bbbcb50ff1f8b2fd9ffbcfb4e1326b27 QtWidgets: Suppress QEvent::WindowActivate when minimized
| * ffac8995769f27fe0d68d5e0cd75716afd3d1167 Fix the size calculation of QHeaderView when stylesheet is used
| * 66a9c4b0b259fe9a61150b7394af0f31ebfd38ac Remove usages of deprecated APIs of QDesktopWidget
| * 1748dc3e2d2367f9f01666212a22e6b1dde5dc89 QGroupBox: always disable children in a checkable, unchecked groupbox
| * 81a790969395feff73fa600908822765e97424e5 Fusion Style: Use high-dpi pixmaps
| * 65fcd8524da628c99e8cd28f983f0c17fbe157f0 QAbstractScrollArea: when used as a popup, apply regular popup behavior
| * f1dd6addda908185f497d299d706b88977dea858 Make QTextBlockFormat::MarkerType an enum class
b6ce61f486a06ded273d518d871906f9a53ab7c1 Fix text not rendering properly after setAlignment call
ce2fc51914f809369d5096e7a0621229dd9eaef9 Add check for global share context for QOpenGLWidget initialize
| * f7cb11d6f12f7bb353640637719292b95fd21438 QWidget: Answer question raised in fixme comment
| * 00e8f044e1954ea47f1f0c5c5ff35fff97b732be QWidget: document that a widget might only get a mouseDoubleClickEvent
5aa13ea144cff4dbadf12c08b7aa49646347e186 QTreeWidget: Don't assume the selected indexes include the first column
7d73d4b9a93b3132c1a24aa3ae77f0a307e821fd Remove the unregistered recognizer from the main list
e02293a76d21e7077f1952d4ed8af6c6d1970190 Always update the pressed position when pressing on an item
| * ad86c2f0abb4fab5bf871fe49b37e0a2f4a346bc Quiet several more warnings about QWheelEvent deprecations
947883141d9d8b3079a8a21981ad8a5ce3c4798e QWidget::setFocusProxy: adjust focus widget properly
8810f82f3f9b3fe35d82fb842a5a21a098b2343f QWizard/Aerostyle: Fix "&Next" shortcut
27782af8219e244fb8cea60e3f22448d5d075446 QWizard: Use member initialization in private classes
| * 688369999435d6f4755577fe47ff80132254bb26 QCommonStyle: Add SP_DialogNoButton case in standardIcon
| * 70c053ee684448984b1f762abd3b40884cece2fa QAbstractSpinBox css: properly honor spincontrol-disable-on-bounds
9b6179cf957c32e0c02547d510dfee2088f02340 Ensure all children of a widget get updated when a stylesheet changes
Not enough support and integration for common functionality on mobile platforms (like push notifications and other native functionality)
Android and IOS support is almost outdated. You are unable to keep up with the modern OS features (like android rounded icon support, battery state, signal strength, play store/app store integration, notifications, runtime permission requests etc (i.e. aab package support just added recently with 5.14, you are too slow)
Yes, Qt will always be behind developing mobile features because Qt does not own the platform.
You are pushing Automotive Suite, 3D stuff and 3D Design Studio etc too hard. All that Adobe Photoshop & AI, Sketch integrations etc. Why pushing hard on all those unnecessary stuff hard while not improving your Qt Modules and all the C++/QML code base? Qt is a C++/QML Framework, isn't it?
Qt Quick Controls 2: Not enough widgets there, also they are way too far from native look and feel. There is no proper desktop look & feel for Qt Quick Controls 2 also lacking IOS theme.
again, it's open source. patches welcome.
Developers are the one who really using and care about this library, this framework, not those business guys, the managers are totally incompetence if they still believe those business guys who don't know software(or don't have any passions of software) but money only.
'Those business guys' also care about the framework and demand features such as Photoshop integrations, etc because the customers demand them.
ps : I would vote for bug fixes, focus on major platforms like desktop, mobiles, keep up with modern QS features, then enrich QWidget rather than support support more platforms, languages(python etc). Every platforms work but there are many features you have to develop again
For your undefined symbols, sometimes this is all that needs to be done:
Unfortunately, I am still searching how to do this with my custom headers, as that is throwing me the undefined symbol errors.
Is not working.
@steno said in Building Qt Apps to Wasm:
What was your solution for machine type must be wasm32? I have been seeing this as well.
If you use the prebuilt binaries, you need to use emscripten version 1.38.27 or 1.38.30 for threaded.
./emsdk install sdk-fastcomp-1.38.27-64bit
./emsdk activate sdk-fastcomp-1.38.27-64bit
It depends entirely on what your application actually does, as there are quite a few features present in the desktop and embedded platforms that will not work on WebAssembly platform.
There are plenty of example apps:
You need to explicitly enable the webassembly plugin.
From the menu: QtCreator->About plugins->Device Support->WebAssembly (experimental)
Depending on your version of emscripten that you installed, it may or may not successfully detect the emscripten compiler.
To remove clipboard error, i disabled clipboard in source code :
/*val permissions = val::global("navigator")["permissions"];
val readPermissionsMap = val::object();
val writePermissionsMap = val::object();
hasClipboardApi = false;
Clipboard permission is not managed on my firefox (63.0.3 64bit).
And to the blank page, i used QQuickView with resizeMode at SizeRootObjectToView :
QQuickView* view = new QQuickView();
Here is my path statement. There is a lot you probably don't care about but I included it all. I downloaded and installed the latest including the MSYS utilities. Sorry, I am not familiar with the MinGW toolset. It's a little unclear to me what version the Mingw is as different parts seem to have separate versions.
Thanks for your help.
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS;
C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS;
C:\Program Files (x86)\Windows Resource Kits\Tools;
C:\Program Files\Microsoft SQL Server\120\Tools\Binn;
C:\Program Files\Microsoft\Web Platform Installer;
C:\Program Files\Microsoft SQL Server\130\Tools\Binn;
C:\Program Files (x86)\Calibre2;C:\Program Files\PuTTY;
C:\Program Files (x86)\WiX Toolset v3.11;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;
C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;
C:\Program Files (x86)\IncrediBuild;
C:\Program Files\Common Files\Intel\WirelessCommon;
C:\Program Files (x86)\GnuWin32\bin;
@tham your browser has a variety of option for you to do so.
For chrome you could do one of the following:
Use incognito mode
Use the dev settings to disable it-
Use Chrome profiles to create a profile with all caching disabled
I don't know if there's a command or something the server could send to your browser to force a complete reload.
Ok, so I updated my OS, and rebuilt my sources using the configure options :
./configure -xplatform wasm-emscripten -nomake examples -prefix $PWD/qtbase -no-warnings-are-errors -device-option WASM_OBJECT_FILES=1 -feature-thread
And building my sources with the command:
gmake -j4 module-qtbase module-qtdeclarative module-qtquickcontrols2 module-qtwebsockets module-qtsvg module-qtcharts module-qtmqtt module-qtdatavisualization
It all compiles pretty well.
But know when I try to compile a thread example (Mandelbrot for example) the building gives my this:
Qt/5.13.1/Src/qtbase/plugins/imageformats/libqwebp.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libQt5Widgets.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libQt5Gui.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libqtlibpng.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libqtharfbuzz.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libQt5Core.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libqtpcre2.a
wasm-ld: error: 'atomics' feature is disallowed by main_7512882a.o, so --shared-memory must not be used
wasm-ld: error: Target feature 'atomics' used in main.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in mandelbrotwidget.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in renderthread.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in mandelbrot.js_plugin_import.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in moc_mandelbrotwidget.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in moc_renderthread.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in main_ad242c24.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in qwasmintegration_b84335f2.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in qwasmwindow_9693253c.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in qwasmscreen_5d172ee8.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in qwasmfontdatabase_96baba53.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in qwasmeventtranslator_b3a8cbb6.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in qwasmeventdispatcher_d440ff3d.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in qwasmcompositor_943e9174.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in qwasmcursor_54ea64f6.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in qwasmopenglcontext_242faabc.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in qwasmtheme_592c2dd9.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in qwasmclipboard_11896fc1.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: Target feature 'atomics' used in qwasmservices_bcfe057a.o is disallowed by main_7512882a.o. Use --no-check-features to suppress.
wasm-ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
shared:ERROR: '/Users/macbook/emsdks/emsdk/upstream/bin/wasm-ld -o /var/folders/l_/53ppf0452z7bcrt24txtwfq00000gn/T/emscripten_temp_chKBFJ/mandelbrot.wasm --allow-undefined --lto-O0 /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libqtfreetype.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libqtlibpng.a -L/Users/macbook/emsdks/emsdk/upstream/emscripten/system/local/lib main.o -L/Users/macbook/emsdks/emsdk/upstream/emscripten/system/lib mandelbrotwidget.o -L/Users/macbook/.emscripten_cache/wasm-obj renderthread.o mandelbrot.js_plugin_import.o moc_mandelbrotwidget.o moc_renderthread.o /Users/macbook/Qt/5.13.1/Src/qtbase/plugins/platforms/libqwasm.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libQt5EventDispatcherSupport.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libQt5FontDatabaseSupport.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libqtfreetype.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libQt5EglSupport.a /Users/macbook/Qt/5.13.1/Src/qtbase/plugins/imageformats/libqgif.a /Users/macbook/Qt/5.13.1/Src/qtbase/plugins/imageformats/libqicns.a /Users/macbook/Qt/5.13.1/Src/qtbase/plugins/imageformats/libqico.a /Users/macbook/Qt/5.13.1/Src/qtbase/plugins/imageformats/libqjpeg.a /Users/macbook/Qt/5.13.1/Src/qtbase/plugins/imageformats/libqtga.a /Users/macbook/Qt/5.13.1/Src/qtbase/plugins/imageformats/libqtiff.a /Users/macbook/Qt/5.13.1/Src/qtbase/plugins/imageformats/libqwbmp.a /Users/macbook/Qt/5.13.1/Src/qtbase/plugins/imageformats/libqwebp.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libQt5Widgets.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libQt5Gui.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libqtlibpng.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libqtharfbuzz.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libQt5Core.a /Users/macbook/Qt/5.13.1/Src/qtbase/lib/libqtpcre2.a /Users/macbook/.emscripten_cache/wasm-obj/libc-mt.a /Users/macbook/.emscripten_cache/wasm-obj/libcompiler_rt.a /Users/macbook/.emscripten_cache/wasm-obj/libc-wasm.a /Users/macbook/.emscripten_cache/wasm-obj/libc++-mt-noexcept.a /Users/macbook/.emscripten_cache/wasm-obj/libc++abi-mt-noexcept.a --whole-archive /Users/macbook/.emscripten_cache/wasm-obj/libembind-rtti.a --no-whole-archive /Users/macbook/.emscripten_cache/wasm-obj/libgl-mt-webgl2.a /Users/macbook/.emscripten_cache/wasm-obj/libdlmalloc-mt.a /Users/macbook/.emscripten_cache/wasm-obj/libpthread-mt.a /Users/macbook/.emscripten_cache/wasm-obj/libc_rt_wasm.a --import-memory --import-table --shared-memory -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --export __wasm_call_ctors --export __data_end --export main --export malloc --export free --export setThrew --export __errno_location --export fflush --export emscripten_get_global_libc --export __pthread_tsd_run_dtors --export _register_pthread_ptr --export pthread_self --export __emscripten_pthread_data_constructor --export emscripten_futex_wake --export memalign --export emscripten_builtin_memalign --export realloc --export emscripten_builtin_free --export _get_environ --export _ZSt18uncaught_exceptionv --export emscripten_GetProcAddress --export emscripten_webgl_make_context_current --export emscripten_webgl_get_current_context --export strstr --export _get_tzname --export _get_daylight --export _get_timezone --export strlen -z stack-size=5242880 --initial-memory=1073741824 --no-entry --max-memory=1073741824 --global-base=1024' failed (1)
gmake: *** [Makefile:320: mandelbrot.js] Error 1
10:58:20: The process "/usr/local/bin/gmake" exited with code 2.
Error while building/deploying project mandelbrot (kit: Qt 5.13.1 (Src))
When executing step "Make"
10:58:20: Elapsed time: 00:58.
And I have no clue what it means.
I was able to configure an out-of-source build, passing win32-msvc2019 as the argument for -platform, I got the output shown in this Gist: https://gist.github.com/DragonOsman/3c198095a61a7c38e2b019d3a964d416 . Notice the errors. I configured with this command:
C:/qt5/configure -static -release -opensource -feature-thread -qt-zlib -qt-libjpeg -qt-libpng -platform win32-msvc2019 -prefix C:/qt5/qtbase/win32-msvc2019
from a separate directory outside the Qt source directory and tried to build by running just nmake with no arguments. Any help is appreciated. Thanks in advance.
Edit: I tried again after re-configuring and this time not passing -static at all, but it still failed. Here's the build log from the recent try: https://gist.github.com/DragonOsman/c13d23ceca50244fb4a195f67d8e613d .
That said, there is a change that I have found helps somewhat. If you build Qt yourself, you could try this:
I think the reason for the Assert Failure errors is that I forgot to delete the files in the qtbase folder after a given build attempt. I think that's fixed now, but I still have some issues in building Qt so I'll open a thread now.
Other than adding your libs with LIBS += -lblahblah
you shouldn't have to pass anything extra to Qt to get it to link statically, as QtWebAssembly does that anyway.
You could try QMAKE_LFLAGS += -static in your project if there is any issues, or it tries to link dynamically.