1

I'm trying to run a simple template in release mode on Visual Studio with the Qt extension. So far I've always been running projects in debug mode (never had trouble). Recently, I started with a browser application using webengine its widgets, but it's very slow on debug mode, so. I wanted to make sure it's possible to run with higher performance (on release mode), before continuing.

I was surprised, because the application throws 4 error message pop-ups after each other after trying to run it:

  • The procedure entry point ?endl@QTextStreamFunctions@@YAAEAVQTextStream@@AEAV2@@Z could not be located in the dynamic link library C:\Qt\5.14.1\msvc2017_64\bin\Qt5WebChannel.dll.

  • The procedure entry point ?argToQString@QQtPrivate...QString...QStringView... could not be located in the dynamic link library C:\Qt\5.14.1\msvc2017_64\bin\Qt5WebChannel.dll.

  • Two more similar ones for QDebug and QRhiDepthStencilClearValue.

So instead, I tried to compile a simple project (the direct QtWidgetsApplication template) and it gave me this:

This application failed to start because no Qt Platform plugin could be initialized. Reinstalling the application may fix this problem.

I've been looking for a solution for quite some time now, but I didn't find a clear answer.

My directory: C:\Qt\5.14.1\msvc2017_64

My template code:

#include "QtWidgetsApplication2.h"
#include <QtWidgets/QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QtWidgetsApplication2 w;
    w.show();
    return a.exec();
}
#pragma once

#include <QtWidgets/QMainWindow>
#include "ui_QtWidgetsApplication2.h"

class QtWidgetsApplication2 : public QMainWindow
{
    Q_OBJECT

public:
    QtWidgetsApplication2(QWidget *parent = Q_NULLPTR);

private:
    Ui::QtWidgetsApplication2Class ui;
};
#include "QtWidgetsApplication2.h"

QtWidgetsApplication2::QtWidgetsApplication2(QWidget *parent)
    : QMainWindow(parent)
{
    ui.setupUi(this);
}

I have no clue of how to fix this problem. Could you please help me out? Thanks in advance!

1 Answers1

0

See if this helps.

Are you trying to start the program by double clicking the .exe ? I tried to reproduce it:

  • build a simple project in release mode
  • run windeployqt ... and delete the generated folder ./platforms
  • double click on .exe to run it.

and prompts the error message you got.

cangyin
  • 43
  • 7
  • Thanks for bothering! I simply run it with the green |> button, next to [Relase] and [x64] on VS. I went through the links in the suggested post (which btw I hadn't found before), but had difficulties understanding most of it. The most similar is [this question](https://stackoverflow.com/questions/18368826/deploying-qt-c-application-from-visual-studio-qwindows-dll-error), but its answer is for people who use the _libGLESv2.dll_. I don't know how to tell if I'm using it... –  Jul 16 '20 at 18:10
  • So I searched how to find out which libraries are used and came across [some linux command-line solution](https://stackoverflow.com/questions/50159/how-to-show-all-shared-libraries-used-by-executables-in-linux), but I'm on Windows, and I guess it's not going to work on PowerShell / Command Line :( –  Jul 16 '20 at 18:13