How to Compile and Distruite your application
-
So, I want to send a demo to my client. I have compile the app, but What I really to do to make my application be runnable at any linux...
Any tutorial, tip, video will help...Thanks all.
-
Perhaps you might want to test with a vanilla copy of the Linux distribution your client has with virtualizaion software such as VirtualBox.
-
I make that, I copy the binary file and does not works...
-
Does it starts with some errors or just missing libraries?
-
See "this thread":http://qt-project.org/forums/viewthread/1872
For me it works perfectly both on linux x86 and arm architectures. -
The error that I get on VM Ubuntu:
bash: ./InoveSATBEV: cannot execute binary file
-
try to change permission:
@
chmod u+x InoveSATBEV
@ -
Still not working... same error...
I clients computer I need to Install something? -
Are you sure your application was developed for the same client computer architecture ?
What give you
@
lscpu
@command on client machine ?
And what return
@
file InoveSATBEV
@command on client machine ?
-
Sure!
I'm testing in my Virtual Machine!
Ow good... I think I found the problem... 64bits!
I compile in 64bits and trying to run on 32bits...Return of comand file InoveSATBEV:
InoveSATBV: setuid ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, BuildID[sha1]=0x0277d22e5789d5b31dd3e18ec41948e9d078fe21, not stripped -
For each plataform I will need copy the code, compile and test?
I mean, in Linux 32bits and Linux 64bits I will need to compile for each platform... that's right?
On windows 7 is the same thing? -
Applications developed for 32bits can be executed on windows 64 bits. This also applies to almost all 64 bits linux distributions.
-
It's possible to me compile the application to Linux 32bits?
My computer is 64bits, it's possible to compile to both platform in my environment? -
Yes. Install QtSDK for linux 32 bits in your 64 bits environment.
-
Simple.
Thanks, I have have more problems I will ask here. -
OK compiled in 32bits, and works fine on 64bits!
But When I copy the application to another computer, I got this message:./InoveSATBV: error while loading shared libraries: libqextserialport-1.2.so.1: cannot open shared object file: No such file or directory
-
Can I embed this ".so" file in my binary?
-
[quote author="dcbasso" date="1344085828"]Can I embed this ".so" file in my binary?[/quote]
Yes if you build libqextserialport as static library.
[quote author="dcbasso" date="1344085378"]./InoveSATBV: error while loading shared libraries: libqextserialport-1.2.so.1: cannot open shared object file: No such file or directory[/quote]
Well, did you build libqextserialport yourself, or did you installed as part as your linux libraries packages ?
What is the result of
@
ldd InoveSATBV
@command on client machine ?
-
I fix the problem using a runner to my application.
I don't really like my solution:@
#!/bin/sh
export LD_LIBRARY_PATH=.
./appname $*
@See: http://www.qtcentre.org/wiki/index.php?title=Deploying_Qt_Applications
Static library? I will search for this "resource".
-
Static Lib need to be a File ended with ".a"?
How can I configure the .pro file to differ the compilation for 32bits and 64bits?