Wrong executable generation in release mode
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 ?
What platform are you targeting ?
@SGaist My target platform is Linux Fedora 23
Can you share your complete .pro file ?
I'm having the same problem on Ubuntu 16.10 64 bit.
 It's also "application/x-sharedlib" in debug mode. The project is here:
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.
For me, it's the same problem across multiple projects and different machines. Running qmake doesn't help.
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.