Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Wrong executable generation in release mode
Forum Updated to NodeBB v4.3 + New Features

Wrong executable generation in release mode

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 2.7k Views 3 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.
  • CutiUserC Offline
    CutiUserC Offline
    CutiUser
    wrote on last edited by
    #1

    Hello,

    I'm using Linux Fedora 23, Qt Creator 4.0.3 and Qt 4.8.6. I have a problem when I generate my executable project file in "release" mode.

    In "debug" mode, the generated executable file type is (in my file explorer) : "Application (application/x-executable)", all is good.

    Strangely, in release mode, the generated executable file type is (in my file explorer) : "Inconnu (application/x-sharedlib)". It must be "Application (application/x-executable)", too ?!...

    In my projet file (.pro), I have :

    QT += opengl \
        network \
        xml \
        xmlpatterns
     
    TEMPLATE = app
    

    In my compilation kit, build step debug, I have : "qmake-qt4 MyProject.pro -r -spec linux-g++ CONFIG+=debug"

    If, I put in release "qmake-qt4 MyProject.pro -r -spec linux-g++" or ""qmake-qt4 MyProject.pro -r -spec linux-g++ CONFIG+=release", it generate a "Inconnu (application/x-sharedlib)" exe file. I am waiting for a "Application (application/x-executable)" type...

    Do you have a idea to get the same executable file type in debug and release mode ?

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

      Hi,

      What platform are you targeting ?

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

      CutiUserC 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        What platform are you targeting ?

        CutiUserC Offline
        CutiUserC Offline
        CutiUser
        wrote on last edited by
        #3

        @SGaist My target platform is Linux Fedora 23

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

          Can you share your complete .pro file ?

          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
          1
          • E Offline
            E Offline
            Esperantisto
            wrote on last edited by Esperantisto
            #5

            I'm having the same problem on Ubuntu 16.10 64 bit.

            [edit] It's also "application/x-sharedlib" in debug mode. The project is here:
            https://github.com/Barugon/CotA

            1 Reply Last reply
            0
            • CutiUserC CutiUser

              Hello,

              I'm using Linux Fedora 23, Qt Creator 4.0.3 and Qt 4.8.6. I have a problem when I generate my executable project file in "release" mode.

              In "debug" mode, the generated executable file type is (in my file explorer) : "Application (application/x-executable)", all is good.

              Strangely, in release mode, the generated executable file type is (in my file explorer) : "Inconnu (application/x-sharedlib)". It must be "Application (application/x-executable)", too ?!...

              In my projet file (.pro), I have :

              QT += opengl \
                  network \
                  xml \
                  xmlpatterns
               
              TEMPLATE = app
              

              In my compilation kit, build step debug, I have : "qmake-qt4 MyProject.pro -r -spec linux-g++ CONFIG+=debug"

              If, I put in release "qmake-qt4 MyProject.pro -r -spec linux-g++" or ""qmake-qt4 MyProject.pro -r -spec linux-g++ CONFIG+=release", it generate a "Inconnu (application/x-sharedlib)" exe file. I am waiting for a "Application (application/x-executable)" type...

              Do you have a idea to get the same executable file type in debug and release mode ?

              K Offline
              K Offline
              koahnig
              wrote on last edited by
              #6

              @CutiUser

              Did you rerun qmake from Qt creator already?

              I am facing sometimes similar problems on win 10. There seem to be a correlation with changing between release and debug modes as well as changing the project in focus. Manual run of qmake in Qt creator helps.

              If this does not help the check of .pro is certainly the next step as @SGaist already suggested.

              Vote the answer(s) that helped you to solve your issue(s)

              E 1 Reply Last reply
              0
              • K koahnig

                @CutiUser

                Did you rerun qmake from Qt creator already?

                I am facing sometimes similar problems on win 10. There seem to be a correlation with changing between release and debug modes as well as changing the project in focus. Manual run of qmake in Qt creator helps.

                If this does not help the check of .pro is certainly the next step as @SGaist already suggested.

                E Offline
                E Offline
                Esperantisto
                wrote on last edited by Esperantisto
                #7

                @koahnig
                For me, it's the same problem across multiple projects and different machines. Running qmake doesn't help.

                1 Reply Last reply
                0
                • E Offline
                  E Offline
                  Esperantisto
                  wrote on last edited by
                  #8

                  It turns out that this is a shared-mime-info issue where PIE executables are being treated as ELF shared objects. A workaround for this is to add "QMAKE_LFLAGS = -no-pie" to the qmake project file.

                  1 Reply Last reply
                  1

                  • Login

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