The procedure entry point_ZN10QArrayData10deallocateEPS_ii
-
i am very new using QT-creator 5.15.1
and created a empty Windows widget application.
( using 5.15.1 for compatibility with a book example )the app. works while using QT-creator when 'Run' button is pressed.
however in the release folder, i get the "Entry Point Not Found" error window.do not assume that i have anything setup correctly but i am trying to.
i have run 'qtenv2.bat'
and 'windeployqt.exe' imageviewer.exe
from inside of the release folder.am i doing this correctly ?
i can provide the output of 'windeployqt'
[ but it is fairly long and not sure how to best include it in this posting ]
Thanks -
5.15.1 is a Qt library version, not a Qt Creator version (presently 14.x). The two are not connected.
In your run time environment you are either completely missing a DLL or DLLs, or your application is finding a mismatched Qt library version. The function
QArrayData::deallocate()
referred to in the screen shot is part of Qt's core library.Have you actually built a 32-bit executable?
-
5.15.1 is a Qt library version, not a Qt Creator version (presently 14.x). The two are not connected.
In your run time environment you are either completely missing a DLL or DLLs, or your application is finding a mismatched Qt library version. The function
QArrayData::deallocate()
referred to in the screen shot is part of Qt's core library.Have you actually built a 32-bit executable?
@ChrisW67 you're correct; i am using Qt Creator 14.0.1 with Qt 5.15.1 MinGW 32-bit
on a AMD64 i3-3217U processor.the first question is my build selection of " Desktop Qt 5.15.1 MinGW 32-bit" ok to use with the above processor ?
i don't understand your question "Have you actually built a 32-bit executable?"
that certainly was my intention, there is a "ImageViewer.exe" in my release folder; but for all i know it could be 64 bit, however that seem unlikely.as i initially said, i am very new to programing so i may not have the correct build environment, use the wrong complier, chosen an incorrect "Make" program
i.e. qmake VS Cmake. sure seems there are a lot of places to do things wrong, particularly in the 'qtenv2.bat' file as i think i should have a notation for AMD64. -
I asked about a 32-bit executable because the default these days is a 64-bit executable and mixing 64-bit and 32-bit libs is a good way to break things.
Make sure you are runningQTDIR/bin/qtenv2.bat
found in the Qt directory containing your 32-bit Qt 5.15.2 libraries.Make an empty folder and copy the
imageviewer.exe
there. Run windeployqt against that directory
Exactly what files and directories does your deployed folder contain? -
I asked about a 32-bit executable because the default these days is a 64-bit executable and mixing 64-bit and 32-bit libs is a good way to break things.
Make sure you are runningQTDIR/bin/qtenv2.bat
found in the Qt directory containing your 32-bit Qt 5.15.2 libraries.Make an empty folder and copy the
imageviewer.exe
there. Run windeployqt against that directory
Exactly what files and directories does your deployed folder contain?@ChrisW67 said in The procedure entry point_ZN10QArrayData10deallocateEPS_ii:
windeployqt
- moved into the 'test' folder
- ran e:\qt\5.15.1\mingw81_32\bin\qtenv2.bat
3)ran e:\qt\5.15.1\mingw81_32\bin\windeployqt.exe ImageViewer.exe
@ChrisW67 you said 'mixing 64-bit and 32-bit libs is a good way to break things'
for education and clarification:
in following my steps 1-3 above, is there a possibility that doing this could cause
'mixing 64-bit and 32-bit lib' ??? -
Hi! For me with Qt5.X sometimes the windeployt copies the lib*.dll-s from some other directory than it is found in the (in your case E:\qt\5.15.1\mingw81_32\bin) and that made mysterious errors when I run the 'exe'. I suggest to compare those dll-s to be the same (version, size, etc.) as you find in the bin directory of your compiler.
-
@ChrisW67 thanks for all your help. because after 3 weeks of trying to learn how to use Qt, i was just about ready to, give up ever being able to get a deployed executable to work.
i made a large assumption that Qt produced a working executable in either the 'debug' or 'release' folders. WRONG.
i had no knowledge until a couple of days ago that i needed to 'run' the "windeployqt.exe" with my program "ImageViewer.exe" as it's argument. Effectively, i exhausted 19 day & nights unable to produce a deployable program.
i am so excited to mark this as "Solved" -
Hi! For me with Qt5.X sometimes the windeployt copies the lib*.dll-s from some other directory than it is found in the (in your case E:\qt\5.15.1\mingw81_32\bin) and that made mysterious errors when I run the 'exe'. I suggest to compare those dll-s to be the same (version, size, etc.) as you find in the bin directory of your compiler.
@sbela yes that is a good suggestion to compare source dll's to targeted dll's.
i was not experiencing mysterious errors when running the build using Qt creator and was not getting mysterious error using 'windeployqt.exe' because i was not even aware of it until 2 days ago.
the only errors i was getting was, when i inappropriately moved my ImageViewer.exe out of either debug or release folder and tried to run it outside of the IDE. -
now i would like to ask a new related question.
what are the steps to creating a program from a CMD prompt as is done in a book i have been working with for over a month.
assuming the directory i start in i.e. E:\qt\5.15.1\mingw81_32\ImageViewer\-
create a source file - main.cpp
poundsymbol include <QApplication>
poundsymbol include <QMainWindow>
int main (int argc, char *argv[])
{
QApplicaion app (argc, argv);
QMainWindow window;
window.show();
return app.exec();
} -
create a project file
qmake -project -
create a makefile
qmake -makefile -
edit by updating the makefile, by adding: greaterThan (QT_MAJOR_VERSION, 4): QT += widgets
after the editing :
TEMPLATE = app
TARGET = ImageViewer
greaterThan (QT_MAJOR_VERSION, 4): QT += widgets
INCLUDEPATH += .
DEFINES += QT_DEPRECATED_WARNINGS
SOURCE += main.cpp- run the make program
[ this is where i am unclear and i have had so much difficulty as there are so many variations/flavors of "make" i.e. cmake, nmake, make, bmake, qmake...etc.
because ' -project' & ' -makefile' are created with qmake.exe, i thought the step 5 would be: qmake ]
qmake
-
never gotten this far but, would you now create a new directory i.e. 'output' and copy 'ImageViewer.exe' in to it.
-
run from inside of the 'output' directory
E:\qt\5.15.1\mingw81_32\bin\qtenv2.bat -
also run from inside of the 'output' directory
E:\qt\5.15.1\mingw81_32\bin\windeployqt.exe ImageViewer.exe
in summary, i apologize for giving so many steps but i have been doing this process incorrectly for so long that i thought these details might alert someone as to, missing steps and / or steps taken out of sequence.
because i was never successful at getting this to work from CMD prompt, i have been trying to learn more by using Qt in a GUI development environment, that is Qt creator; so that i have a better chance of creating an executable program from a CMD environment.i am pretty unclear as to what 'make' program (as stated above) should be used at a CMD prompt.
i am not even sure if the assumed steps 7 & 8 are what should be utilized in a CMD prompt environment.the help on this forum is incredible and i have spent weeks trying to learn cmake and others but i have gotten fairly lost in doing so. thanks so much for all the quick responding assistance !
-
-
-
@ChrisW67 thanks for all your help. because after 3 weeks of trying to learn how to use Qt, i was just about ready to, give up ever being able to get a deployed executable to work.
i made a large assumption that Qt produced a working executable in either the 'debug' or 'release' folders. WRONG.
i had no knowledge until a couple of days ago that i needed to 'run' the "windeployqt.exe" with my program "ImageViewer.exe" as it's argument. Effectively, i exhausted 19 day & nights unable to produce a deployable program.
i am so excited to mark this as "Solved"@uglybug said in The procedure entry point_ZN10QArrayData10deallocateEPS_ii:
i made a large assumption that Qt produced a working executable in either the 'debug' or 'release' folders. WRONG.
That's not quite correct. The executable it places in the debug or release folder is working, but it does not stand alone. At run time it requires a matching set of libraries and plugins to be found. When you run this from the Qt Creator IDE the run time environment is set such that the running executable find these libraries and the program runs. By default the Qt Creator project Run settings mirror the build settings: these are visible in the Project Settings but vary slightly between Linux (below, LD_LIBRARY_PATH) and Windows (I assume use PATH in the same role) because the platforms have different run time search algorithms for dependencies:
Theqtenv2.bat
file tries to achieve a similar, basic setup for a command prompt environment.When you take the executable out of that environment to run on its own (on your dev or another machine) you need to ensure the dependencies are found by the default search method on the target platform.
windeployqt
tries to do this bundling for you by interrogating the produced executable and copying the relevant files (and some standard Qt/platform elements) alongside the executable. These are the files that you see in the separate folder I asked you to create. This is not a completely foolproof tool but it should cover straightforward cases.I asked for a separate directory reduce any possible cross-contamination of other things that will exist in the release/debug folder i.e. simplify the problem to aid debugging.
-
now i would like to ask a new related question.
what are the steps to creating a program from a CMD prompt as is done in a book i have been working with for over a month.
assuming the directory i start in i.e. E:\qt\5.15.1\mingw81_32\ImageViewer\-
create a source file - main.cpp
poundsymbol include <QApplication>
poundsymbol include <QMainWindow>
int main (int argc, char *argv[])
{
QApplicaion app (argc, argv);
QMainWindow window;
window.show();
return app.exec();
} -
create a project file
qmake -project -
create a makefile
qmake -makefile -
edit by updating the makefile, by adding: greaterThan (QT_MAJOR_VERSION, 4): QT += widgets
after the editing :
TEMPLATE = app
TARGET = ImageViewer
greaterThan (QT_MAJOR_VERSION, 4): QT += widgets
INCLUDEPATH += .
DEFINES += QT_DEPRECATED_WARNINGS
SOURCE += main.cpp- run the make program
[ this is where i am unclear and i have had so much difficulty as there are so many variations/flavors of "make" i.e. cmake, nmake, make, bmake, qmake...etc.
because ' -project' & ' -makefile' are created with qmake.exe, i thought the step 5 would be: qmake ]
qmake
-
never gotten this far but, would you now create a new directory i.e. 'output' and copy 'ImageViewer.exe' in to it.
-
run from inside of the 'output' directory
E:\qt\5.15.1\mingw81_32\bin\qtenv2.bat -
also run from inside of the 'output' directory
E:\qt\5.15.1\mingw81_32\bin\windeployqt.exe ImageViewer.exe
in summary, i apologize for giving so many steps but i have been doing this process incorrectly for so long that i thought these details might alert someone as to, missing steps and / or steps taken out of sequence.
because i was never successful at getting this to work from CMD prompt, i have been trying to learn more by using Qt in a GUI development environment, that is Qt creator; so that i have a better chance of creating an executable program from a CMD environment.i am pretty unclear as to what 'make' program (as stated above) should be used at a CMD prompt.
i am not even sure if the assumed steps 7 & 8 are what should be utilized in a CMD prompt environment.the help on this forum is incredible and i have spent weeks trying to learn cmake and others but i have gotten fairly lost in doing so. thanks so much for all the quick responding assistance !
@uglybug The order of the commands is wrong:
2. Execute E:\qt\5.15.1\mingw81_32\bin\qtenv2.bat
3. Create project file
4. Edit project file (not Makefile!) to add "greaterThan (QT_MAJOR_VERSION, 4): QT += widgets"
5. Run qmake (this generates Makefile)
6. Run make (nmake or make from MinGW, this builds your project according to Makefile)
7. Run windeployqt.exe -