Solved Create Linux Executable for Qt Application
-
-
Hi,
I am using pluginandpaint examples from qt for now.
@jsulm I am trying the shared libaray approach for creating my executable. Following is the snap of everything i have :
I tried following instructions provided as follows:
And I should get a executable but no luck. :(
-
@jineshmehta Can you please post the whole pro file as text?
"And I should get a executable but no luck. :(" - I'm sure you get an executable (or is compiling failing? If so please post the errors), as it is working from QtCreator. You're hunting the wrong issue. And you did NOT follow all instructions. You stop after building, but you have to deploy. Please take a look and follow the chapter "Creating the Application Package" in the link I posted. -
@jsulm I have created a small video of the step I am following. Let me know if something is wrong.
FYI :
https://streamable.com/ockbjf -
@jineshmehta Please open a terminal go to the directory where your app was deployed to and start the app. Do you see any errors/warnings?
-
-
@jineshmehta UNIX basics: ./plugandpaint
-
@jsulm It works. But cant we create an executable?
-
@jineshmehta said in Create Linux Executable for Qt Application:
It works. But cant we create an executable?
I don't get it: if it works it is already an executable.
Or do you mean you want to have everything in one single executable? -
@jsulm i want it like send one. Something like qtmaintainence tool
@jineshmehta said in Create Linux Executable for Qt Application:
I am trying to create a executable file on Linux something like maintenance tool (see snap)
I am using Template as app for my qt project like this :
#config
CONFIG += c++11
#template
TEMPLATE = appThe file getting created is a shared library. I don't know why. Please assist.
-
@jineshmehta Sorry, I don't understand what you mean. plugandpaint is your executable, so what do you want to change?
-
@jineshmehta If you're confused by this "shared library" in file manager shown for plugandpaint then this is an issue in the file manager. My file manager also shows "shared library" for executables for whatever reason.
-
@jsulm oh ok. I was confused about that only. Thanks for the clarification.
-
@jsulm I found the problem and the solution as well. Check this out: https://stackoverflow.com/questions/45329372/ubuntu-recognizes-executable-as-shared-library-and-wont-run-it-by-clicking