deploy qt console app compiled with Ming 32
-
I am using QtCreator 7.0.2
I am using kit C:\Qt7\Tools\mingw810_32\bin\gcc.exe / g++
This is based on a Cmake file as:cmake_minimum_required(VERSION 3.14) project(ae_driver LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set (CMAKE_CXX_FLAGS "-no-pie") include_directories(blah) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core) add_executable(program main.cpp) if(LINUX) target_link_libraries(ae_driver Qt${QT_VERSION_MAJOR}::Core pthread dl) endif (LINUX) if(WIN32) target_link_libraries(ae_driver Qt${QT_VERSION_MAJOR}::Core) endif (WIN32)
I am building this app because it has to load a 32 bit shitty, using LoadLibrary, then get's the Proc addresses.
All good so far. running fine from the QtCreator environment in debug and run buttons.
I ran the >windeployqt myexe.exe and brought a dlls in the folder.
like Qt5Core.dll- When I ran it from shell I got: libgcc_s_dw2-1.dll.
I copied that manually from : Qt/.../ming16/
Now I get : The application was unable to start correctly (0xc000007b). - Runs fine from the QtCrearor IDE.
- When I ran it from shell I got: libgcc_s_dw2-1.dll.