Executable file in release configuration bigger than in debug configuration
-
I'm intrigued with a game I am developing in Qt 6.6.0. In Windows 11, linux Mint and MacOS Monterey, the executable file in release mode is aprox. 135MB, in debug mode is aprox. 85MB which is strange.
I am using QtCreator default configurations, the effective qmake callin debug mode:
C:/QtOpensourse/6.6.0/mingw_64/bin/qmake.exe D:\qt5projets\davidgalacticadventures\DavidGalacticAdventures.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" && C:/QtOpensourse/Tools/mingw1120_64/bin/mingw32-make.exe qmake_allin release mode:
C:/QtOpensourse/6.6.0/mingw_64/bin/qmake.exe D:\qt5projets\davidgalacticadventures\DavidGalacticAdventures.pro -spec win32-g++ "CONFIG+=qtquickcompiler" && C:/QtOpensourse/Tools/mingw1120_64/bin/mingw32-make.exe qmake_allMy pro file is
TEMPLATE = app QT += quick multimedia quick3d gui TARGET = DavidGalacticAdventures QMAKE_CXXFLAGS += -flarge-source-files #CONFIG += c++11 #qmltypes #QML_IMPORT_NAME = com.estudiotecnologico #QML_IMPORT_MAJOR_VERSION = 1 #INCLUDEPATH += $$PWD #INCLUDEPATH += $$PWD/oceanEffect # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ oceanEffect/oceaneffect.cpp \ path.cpp \ pathcircular.cpp \ pathrectangular.cpp \ placement.cpp RESOURCES += qml.qrc \ image.qrc \ modelDavid.qrc \ modelGirl.qrc \ modelHero.qrc \ models.qrc \ modelsBuildingsProps.qrc \ modelsCharatersLowPoly.qrc \ modelstest.qrc \ skybox.qrc \ sound.qrc \ texturesPlanets.qrc TRANSLATIONS += \ DavidGalacticAdventures_pt_PT.ts # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target HEADERS += \ oceanEffect/oceaneffect.h \ path.h \ pathcircular.h \ pathrectangular.h \ placement.h ios { ios_icon.files = $$files($$PWD/ios/AppIcon*.png) QMAKE_BUNDLE_DATA += ios_icon QMAKE_INFO_PLIST = ios/Info.plist } DISTFILES += \ android/AndroidManifest.xml \ android/build.gradle \ android/gradle.properties \ android/gradle.properties \ android/gradle/wrapper/gradle-wrapper.jar \ android/gradle/wrapper/gradle-wrapper.properties \ android/gradlew \ android/gradlew.bat \ android/res/values/libs.xml ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android win32:RC_FILE = appicon.rc ICON = images/spaceshipAlpha.icnsGoogle did not show me any relevant information, not sure where or what I should be looking for. Any indications are welcome.
If it helps to show the code, this app is opensource https://bitbucket.org/joaodeusmorgado/davidgalacticadventures/src/master/
Compiling in linux in debug mode takes aprox. 2 minutes, and 10 minutes in release mode. In windows and Mac, compilation is aprox. 10 / 12 min. in both configurations.
-
I'm intrigued with a game I am developing in Qt 6.6.0. In Windows 11, linux Mint and MacOS Monterey, the executable file in release mode is aprox. 135MB, in debug mode is aprox. 85MB which is strange.
I am using QtCreator default configurations, the effective qmake callin debug mode:
C:/QtOpensourse/6.6.0/mingw_64/bin/qmake.exe D:\qt5projets\davidgalacticadventures\DavidGalacticAdventures.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" && C:/QtOpensourse/Tools/mingw1120_64/bin/mingw32-make.exe qmake_allin release mode:
C:/QtOpensourse/6.6.0/mingw_64/bin/qmake.exe D:\qt5projets\davidgalacticadventures\DavidGalacticAdventures.pro -spec win32-g++ "CONFIG+=qtquickcompiler" && C:/QtOpensourse/Tools/mingw1120_64/bin/mingw32-make.exe qmake_allMy pro file is
TEMPLATE = app QT += quick multimedia quick3d gui TARGET = DavidGalacticAdventures QMAKE_CXXFLAGS += -flarge-source-files #CONFIG += c++11 #qmltypes #QML_IMPORT_NAME = com.estudiotecnologico #QML_IMPORT_MAJOR_VERSION = 1 #INCLUDEPATH += $$PWD #INCLUDEPATH += $$PWD/oceanEffect # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ oceanEffect/oceaneffect.cpp \ path.cpp \ pathcircular.cpp \ pathrectangular.cpp \ placement.cpp RESOURCES += qml.qrc \ image.qrc \ modelDavid.qrc \ modelGirl.qrc \ modelHero.qrc \ models.qrc \ modelsBuildingsProps.qrc \ modelsCharatersLowPoly.qrc \ modelstest.qrc \ skybox.qrc \ sound.qrc \ texturesPlanets.qrc TRANSLATIONS += \ DavidGalacticAdventures_pt_PT.ts # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target HEADERS += \ oceanEffect/oceaneffect.h \ path.h \ pathcircular.h \ pathrectangular.h \ placement.h ios { ios_icon.files = $$files($$PWD/ios/AppIcon*.png) QMAKE_BUNDLE_DATA += ios_icon QMAKE_INFO_PLIST = ios/Info.plist } DISTFILES += \ android/AndroidManifest.xml \ android/build.gradle \ android/gradle.properties \ android/gradle.properties \ android/gradle/wrapper/gradle-wrapper.jar \ android/gradle/wrapper/gradle-wrapper.properties \ android/gradlew \ android/gradlew.bat \ android/res/values/libs.xml ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android win32:RC_FILE = appicon.rc ICON = images/spaceshipAlpha.icnsGoogle did not show me any relevant information, not sure where or what I should be looking for. Any indications are welcome.
If it helps to show the code, this app is opensource https://bitbucket.org/joaodeusmorgado/davidgalacticadventures/src/master/
Compiling in linux in debug mode takes aprox. 2 minutes, and 10 minutes in release mode. In windows and Mac, compilation is aprox. 10 / 12 min. in both configurations.
@johngod said in Executable file in release configuration bigger than in debug configuration:
CONFIG+=qtquickcompiler
Maybe this makes the difference? Try to disable QtQuick compiler.
-
@johngod said in Executable file in release configuration bigger than in debug configuration:
CONFIG+=qtquickcompiler
Maybe this makes the difference? Try to disable QtQuick compiler.
-
J johngod has marked this topic as solved on