N
N
Neonoviiwolf2015-11-11 12:02:34
Qt
Neonoviiwolf, 2015-11-11 12:02:34

The compiled Qt program asks for the qt5cored.dll library, where can I find it?

Good afternoon!
I master the basics of C ++ on Qt
Wrote ala Hello world. I try to run outside of Qt, writes that the qt5core d .dll library is needed, i.e. it was with "d", I didn’t find one and Google didn’t give me anything worthwhile. I tried to rename qt5core.dll to qt5cored.dll, writes that it cannot find the entry to the library.
A couple more small questions, I couldn’t find a way answer in Google.
1) How to remove the error when starting the project in the release "Failed to get the ID of the slave process: The parameter is incorrect.", But it starts
2) Although I click to build the project in the release, it is not built in the end, but it starts (i.e. i.e. there is no exe in the release folder), but in debug mode there are no such problems, is this due to the previous error?
3) I downloaded Qt Creator (Community), but can I embed libraries into an executable file in it? Or will you have to carry all the .dll with the project

#include <QTextStream>

int main()
{
    QTextStream cout (stdout);
    cout <<"Hi"<< endl;
    cout.setCodec("CP866");
    cout <<QString::fromUtf8("привет!")<< endl;
    return 0;
}

Somehow I managed to compile it into a release, but I already need qt5core.dll, copied it into the project, now this is what it says
2c89066edd554764b505d4429f8718c6.jpg

Answer the question

In order to leave comments, you need to log in

4 answer(s)
G
GavriKos, 2015-11-11
@GavriKos

Build the application in Release - and will require without d.

J
Jacob E, 2015-11-11
@Zifix

In order to run outside of Qt Creator, use the windeployqt utility from the standard distribution (folders with Qt)
For distribution, all files and dlls can be rolled into one .exe installer, for example, inno setup, or build Qt statically, and link with your program, then dll will not be needed.

A
Artyom Sveshnikov, 2015-11-11
@zenitfan2109

1) go to the folder with the collected *.exe file.
2) copy the path not to the file, but to the folder where this file is located from step 1
3) run the "Qt command line (with the compiler you need .. there may be several of them)" through the "Start" menu.
4) using the command cd /d <путь из п.2>in the console that opens, go to the folder with the collected *.exe
5) execute windeployqt.exe .
6) done.

Станислав Макаров, 2015-11-11
@Nipheris Куратор тега C++

<Папка установки Qt>\qtbase\bin - берем все что нужно и копируем в папку с exe. Что конкретно нужно, можно выяснить с помощью Dependency Walker или просто пытаться запустить, пока не запустится. А, да, еще вам плагин для платформы понадобится, создаете рядом с exe папку platforms, идете в подпапку с таким же именем в qtbase\bin, копируете оттуда qwindows.dll. Если этого будет недостаточно - ошибку в комментарии.
Переименовывать не стоит, даже если бы это заработало, вы бы поймали кучу непонятных ошибок при отладке. Вам нужно либо скачать готовые дебажные dll-ки, либо скомпилить дебаг-версию Qt самому.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question