Sharedlib instead of executable file on ubuntu
Hi to everyone,
i've finished my qt project and i want to create an executable file.
I'm using Qt 5.9.1 (qt creator 4.3.1).
If a Run the project it produces me a sharedlib as main file, so i can run it calling from a terminal and it works but i can't click on the app icon in order to run it.
is it my mistake?
What do you mean by "it produces a shared lib as main file" ?
When i build the project the only runnable file in the main folder is a application/x-sharedlib with the name of the project.
Can you post your .pro file?
QT += core gui
QT += charts
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Interfaccia
TEMPLATE = app
DEFINES += QT_DEPRECATED_WARNINGS
Hi, also check that you have Shadow builds enabled in Qt Creator.
Looks like your double clicking on the executable and trying to run it. Are you getting the 'library not found' error ? if that is the case, Qt libraries may not be in the path. Please check the path and fix it
Qn : Are you able to run your application from Qt Creator ?
i've the "library not foung error" but if i run the app by terminal it works. Why?
How i can fix the path?
Yes i'm able to run my application from Qt Creator.
i' m trying this way but when i launch the command qmake -config release it gives me
Project MESSAGE: Warning: unknown QT: charts
As silly as it may sound, did you install all of Qt components ?
@SGaist solved but after i've launche the make and every is compiled i try to click on the app and the error is always "library not found"
Are you using a project template ?
SOLVED i used QMAKE_LFLAGS += -no-pie in the .pro file and it produced me an executable file instead of a library
Glad you found out and thanks for sharing !
Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum members may know what you are talking about.