Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Unable to build standalone executable on Windows 7, Qt5.3.1
Forum Updated to NodeBB v4.3 + New Features

Unable to build standalone executable on Windows 7, Qt5.3.1

Scheduled Pinned Locked Moved Installation and Deployment
23 Posts 2 Posters 11.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #21

    That part doesn't show anywhere in the thread, that's why I'm asking this. If you didn't touch Qt's sources then you should be linking to the dynamic c++ runtime (which is a good thing).

    So the question is, are you setting the MT flag anywhere in your project ? If so then please remove it.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • B Offline
      B Offline
      blu083
      wrote on last edited by
      #22

      I've searched the overarching .pro and the two sub project .pro files (one I never touch and is an HIDAPI project). None of them make any reference to an MT flag (I'm still searching around for what that flag is and how it could've been set). Here are the contents of my .pro files:

      @
      TEMPLATE = subdirs
      CONFIG += ordered
      CONFIG += static

      SUBDIRS =
      HIDAPI
      Bootloader
      @

      @
      TARGET = "MyApp"
      TEMPLATE = app
      QT += sql
      QT += widgets
      QMAKE_CXXFLAGS_RELEASE = -Os
      INCLUDEPATH += ../
      SOURCES +=
      MainWindow.cpp
      main.cpp
      Dummy.cpp
      HEADERS +=
      MainWindow.h
      Dummy.h

      FORMS += MainWindow.ui
      RESOURCES += resources.qrc
      OTHER_FILES += windows.rc

      #-------------------------------------------------------------------------------

      Add the correct HIDAPI library according to what OS is being used

      #-------------------------------------------------------------------------------
      win32: LIBS += -L../HIDAPI/windows
      macx: LIBS += -L../HIDAPI/mac
      unix: !macx: LIBS += -L../HIDAPI/linux
      LIBS += -lHIDAPI

      #-------------------------------------------------------------------------------

      Make sure to add the required libraries or frameworks for the hidapi to work

      depending on what OS is being used

      #-------------------------------------------------------------------------------
      macx: LIBS += -framework CoreFoundation -framework IOkit
      win32: LIBS += -lSetupAPI
      unix: !macx: LIBS += -lusb-1.0

      #-------------------------------------------------------------------------------

      Make sure output directory for object file and executable is in the correct

      subdirectory

      #-------------------------------------------------------------------------------
      macx {
      DESTDIR = mac
      OBJECTS_DIR = mac
      MOC_DIR = mac
      UI_DIR = mac
      RCC_DIR = mac
      }
      unix: !macx {
      DESTDIR = linux
      OBJECTS_DIR = linux
      MOC_DIR = linux
      UI_DIR = linux
      RCC_DIR = linux
      }
      win32 {
      DESTDIR = windows
      OBJECTS_DIR = windows
      MOC_DIR = windows
      UI_DIR = windows
      RCC_DIR = windows
      }
      @

      @

      -------------------------------------------------

      Project created by QtCreator 2010-10-29T15:54:07

      -------------------------------------------------

      QT -= gui
      TARGET = HIDAPI
      TEMPLATE = lib
      CONFIG += staticlib
      HEADERS += hidapi.h

      -------------------------------------------------

      Add appropriate source file depending on OS

      -------------------------------------------------

      macx: SOURCES += mac/hid.c
      unix: !macx: SOURCES += linux/hid-libusb.c
      win32: SOURCES += windows/hid.cpp

      -------------------------------------------------

      Make sure output directory for object file and

      library is in the correct subdirectory

      -------------------------------------------------

      macx {
      DESTDIR = mac
      OBJECTS_DIR = mac
      MOC_DIR = mac
      UI_DIR = mac
      RCC_DIR = mac
      }
      unix: !macx {
      DESTDIR = linux
      OBJECTS_DIR = linux
      MOC_DIR = linux
      UI_DIR = linux
      RCC_DIR = linux
      }
      win32 {
      DESTDIR = windows
      OBJECTS_DIR = windows
      MOC_DIR = windows
      UI_DIR = windows
      RCC_DIR = windows
      }
      @

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #23

        Did you also compile your dependencies yourself ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved