missing defaultconnection#qsqldatabase##2peadea - c++

I'm working on a project that uses a sqlite database.
When I run project from the qt creator, everything works fine, but when I run exe file, application reports an error.
The procedure entry point defaultconnection#qsqldatabase##2peadea
could not be located in the dynamic link library.
Do you know where the problem is?
To get all needed libraries I run windeployqt.exe
I've added QT += core gui sql in my project.
In qt creator everything works without error.
In my program directory is:
.\D3Dcompiler_47.dll
.\libEGL.dll
.\libGLESV2.dll
.\myapp.deploy.cmd
.\myapp.exe
.\opengl32sw.dll
.\Qt5Core.dll
.\Qt5Gui.dll
.\Qt5Sql.dll
.\Qt5Svg.dll
.\Qt5Widgets.dll
.\iconengines\qsvgicon.dll
.\imageformats\qgif.dll
.\imageformats\qicns.dll
.\imageformats\qico.dll
.\imageformats\qjpeg.dll
.\imageformats\qsvg.dll
.\imageformats\qtga.dll
.\imageformats\qtiff.dll
.\imageformats\qwbmp.dll
.\imageformats\qwebp.dll
.\platforms\qwindows.dll
.\sqldrivers\qsqlite.dll
.\sqldrivers\qsqlmysql.dll
.\sqldrivers\qsqlodbc.dll
.\sqldrivers\qsqlpsql.dll
.\translations\qt_ca.qm
.\translations\qt_cs.qm
.\translations\qt_de.qm
.\translations\qt_en.qm
.\translations\qt_fi.qm
.\translations\qt_fr.qm
.\translations\qt_he.qm
.\translations\qt_hu.qm
.\translations\qt_it.qm
.\translations\qt_ja.qm
.\translations\qt_ko.qm
.\translations\qt_lv.qm
.\translations\qt_pl.qm
.\translations\qt_ru.qm
.\translations\qt_sk.qm
.\translations\qt_uk.qm

Related

QT Quick (QML) assemble mac-.bundle -> not a dynamic library error when using macdeployqt

I struggle with this for weeks now and hope someone finds this useful or knows an answer.
- I use QT 5.7 and QT 5.8 and the error occurs on both versions.
I have a QT Quick 2.0 application which I build as a dynamically linked .bundle application on a Mac using macdeployqt.
I call macdeployqt with the following parameters:
%{buildDir}/imageDatabase.app -qmldir=%{buildDir}/../UserInterface/ -always-overwrite -verbose=2
The working directory is $QTDIR/bin because macdeploy needs to be run from inside the QT-Installation directory as I learned here: https://forum.qt.io/topic/59030/solved-macdeployqt-problem/6
The following error occurs when I try to run the application:
Double-click: The app opens and the icon appears in the bar on the bottom but besides that nothing happens
Starting the app from Terminal:
Output
Machine:MacOS MyName$ ./tool
QQmlApplicationEngine failed to load component qrc:/main.qml:1 plugin cannot be
loaded for module "QtQuick": '/Users/thorstenbux/DAQRI/gitHub/artoolkit6/Source/Utilities/ImageDBSerialiser/build-ui/imageDatabase.app/Contents/PlugIns/quick/libqtquick2plugin.dylib'
is not a valid Mach-O binary (not a dynamic library)
Calling file on the library in question reveals the following
Machine:MacOS MyName$ file /Users/myname/client/gitHub/tool/SDK/Applications/tool.app/Contents/PlugIns/quick/libqtquickcontrolsplugin.dylib
/Users/myname/client/gitHub/tool/SDK/Applications/tool.app/Contents/PlugIns/quick/libqtquickcontrolsplugin.dylib: Mach-O 64-bit dSYM companion file x86_64
looks like it is loading the debug libraries.
macdeployqt error message is the following:
ERROR: Could not parse otool output: "/Users/myname/DAQRI/gitHub/tool/Source/Utilities/tool/build-tool-Desktop_Qt_5_8_0_clang_64bit-Release/tool.app/Contents/PlugIns/quick/libqtquick2plugin.dylib:\n"
Any ideas?
I finally found a solution in the QT forums. It looks like the macdeployqt has a severe bug: https://bugreports.qt.io/browse/QTBUG-57265
You need to call macdeployqt without the -always-overwrite option.
Many thanks to Andy Shaw who posted that here:
https://bugreports.qt.io/browse/QTBUG-57265?focusedCommentId=346168&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-346168

Qt deployed (macdeployqt) application does not create a file

I'm facing the following problem:
I wrote a simple application to track working hours. Therefor I create a *.db file programmatically.
Launching the application from Qt Creator (debug or release) works perfectly fine.
I used the macdeployqt tool to get a *.dmg file. When starting the application now the method (see below) cannot open, respectively create the *.db file and I run out of ideas why. In addition to this, the application should output some *.csv files. This also fails.
One more information, running the application as administrator using the sudo command on terminal...well it works and the *.db file and *.csv files get created.
So I am quite sure it must deal with file permissions but I have no idea how to change this except for changing it in the information context menu but this didn't help at all.
Below the method for the *.db file which always returns false when not launching the app from Qt Creator:
QFile file(Globals::Environment::WORKING_DIRECTORY + "/" + "Records.db");
if(file.open(QIODevice::ReadWrite))
return true;
else
{
QMessageBox msg;
msg.setWindowTitle("Error");
msg.setText("Failed to create database file!");
msg.exec();
}
return false;
I am on MacOS 10.11.3.
Qt 5.5.1 (Clang 6.1 (Apple), 64 bit)
If more information is needed, I will provide it of course.
Thanks a lot for every help in advance.

Solved but not explained: Qt5.5 webkitwidgets, missing DLL, unexpected crash

I made a very simple and boring postal code -> city lookup program (it uses an online api).
I wanted to add functionality which allows to select any country (which the api can process). For this I wanted to load the main page and parse the DOM to get all the countries. This requires webkitwidgets. http://www.zippopotam.us/#where (this is the table I want to extract the information from)
Unfortunately, when attempting to run the program it never even starts and gives me the Application Output:
Starting ZipcodeToLocation.exe...
The program has unexpectedly finished.
ZipcodeToLocation.exe crashed
So I try running the debugger:
An exception was triggered:
Exception at 0x77cbd4f2, code: 0xc0000135: DLL not found, flags=0x0.
During startup program exited with code 0xc0000135.
Weird... so I try finding this error message on the internet and nothing really helps me. I think maybe I set something up wrong, so I open the webkitwidgets examples and compile those. When attempting to run - same error.
Using programs like some dependency walker didn't really help me much either.
I ran the MaintananceTool to check whether I was missing something, but I wasn't able to detect anything.
Im running QtCreator on Windows btw.
My .pro
QT += core gui webkitwidgets network
CONFIG += c++14
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = ZipcodeToLocation
TEMPLATE = app
SOURCES += main.cpp\
MainWindow.cpp
HEADERS += MainWindow.hpp
FORMS += MainWindow.ui
If I remove the following portion from my main window ctor, everything runs es expected:
auto page = new QWebPage(this);
page->mainFrame()->load(QUrl("http://www.zippopotam.us"));
Note: this is currently the only section using webkitwidgets.
I would be really happy if someone could help me overcome this roadblock and has any suggestions on what might be going wrong.
Edit: Just to make it complete, a screenshot of the depends run: https://i.imgur.com/YWpdlO6.png?1
The german part translates to "The System can't find specified file".
Edit2: If you have QtCreator installed and want to attempt reproducing my error, create new QWidgets application, edit your .pro like so:
QT += core gui webkitwidgets
and this line at the end of MainWindow ctor (probably any usage of webkitwidgets would do):
#include <QWebKitWidgets>
//...
QWebPage *page = new QWebPage(this);
Edit3: As a reaction to a recent comment, I tried copying all dlls from the Qt directory to the .exe location (release) and tried running it from there. It said "Missing Qt5Positioning.dll". Which is weird, because I am not using the location module... But I guess that explains the missing dll crash?
Edit4:
I finally had enough and simply completely reinstalled Qt from scratch. Somehow my installation had to be messed up, because after that the problem vanished.

Exe built using pyinstaller on a Django with pylucene app giving JVM error

I am getting an error:
"Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries"
The error arises when I try to execute my exe file.
I have created exe file through pyinstaller on a django application. Application uses pylucine library. I think it may be the issue of error.
How to fix the error?
Since I can't be certain given you've provided very few details here is a shot in the dark to help solve your problem:
First, try removing the jvm.dll file that gets packaged with the pyinstaller -D youmodule.py command (for now work with the directory command rather than -F option). The reason why is here.
With that jvm.dll file gone, you should start seeing the actual error code - and with that the java class or dependency that isn't being loaded.
If it's a java class that isn't being properly loaded then you know instantly it must not be correcly represented in the classpath environment variable and you should do everything in your power to make sure it is:
e.g.: os.environ['CLASSPATH'] += 'the/path/to/the/jar'
Otherwise, consider bulking up your question with more details, especially if you can get a more meaningful error output.
I had the same error trying to run a .exe built with PyInstaller through wine.
My problem went away by adding C:\Program Files\Java\ [your jdk version here] \jre\bin\server to the PATH environment variable in wine - I suppose it might be the same in Windows.
It also reappeared if I tried to build with C:\Program Files\Java\ [your jdk version here] \jre\bin\server in my PATH, so I had to build without it and then append it before running it (I have no explanation as to why this happens).

qt compiles successfully but runs fail

I compiled bitoin-qt,PTS coin and other Altercoins successfully ,but thay all can't running.
I use MinGW4.4 ,QT 4.8.5 download from website and QT creator 2.8.1.
This is my .pro setting:
BOOST_LIB_SUFFIX=-mgw44-mt-s-1_53
BOOST_INCLUDE_PATH=D:/C/coin/namecoinq/libs/boost_1_53_0
BOOST_LIB_PATH=D:/C/coin/namecoinq/libs/boost_1_53_0/stage/lib
BDB_INCLUDE_PATH=D:/C/coin/namecoinq/libs/db-4.8.30.NC/build_unix
BDB_LIB_PATH=D:/C/coin/namecoinq/libs/db-4.8.30.NC/build_unix
OPENSSL_INCLUDE_PATH=D:/C/coin/namecoinq/libs/openssl-1.0.1e/include
OPENSSL_LIB_PATH=D:/C/coin/namecoinq/libs/openssl-1.0.1e
MINIUPNPC_INCLUDE_PATH=D:/C/coin/namecoinq/libs
MINIUPNPC_LIB_PATH=D:/C/coin/namecoinq/libs/miniupnpc-1.8
And I uncommented this code because MinGW4.4 doesn't suport it(I've used MinGW 4.6,4.7,4.8,but they all even compiled failed) :
#win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat
These all compiled by MinGW4.4 succefully,but the debug and release exe compiled both can't run.I have coped the qt dlls to the exe direction.When I debugged it,it broke before entering the main source.
======================UPDATE edit==========================
I know it's because of leveldb,but I don't know what's wrong with my compiling leveldb:
TARGET_OS=NATIVE_WINDOWS mingw32-make libleveldb.a libmemenv.a
When I use another altercoin leveldb source code,the error solves.But I use back to the original leveldb source code,the program breaks again.
Still seems to me you are missing a .dll. Try using dependency walker and verify you are not missing any dependencies.