Selven
13th April 2012, 22:48
Hello,
I'm trying to make my application portable.
So i want 4 versions :
- 1 static 64 bits
- 1 dynamic 64 bits
And both in 32 bits too.
First, i will do the first group, in 64 bits.
===== DYNAMIC VERSION =====
My program is by default, compiled in dynamic i guess. So, i put the binary file on another computer and trying to run it :
error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory
So i tried to copy the file libQtGui.so.4 from the lib directory, into the folder which contains the binary file. It's the same issue. So I think i forgot something but dunno what.
===== STATIC VERSION =====
I download the library source, and I do these commands :
./configure -static -release -prefix /usr/local/Trolltech/Qt-4.8.1_static
gmake
gmake install
I add manually the static qmake on Qt Creator, i delete the .pro.user and i restart Qt Creator. Now i select the static version of compiler and i compile my application.
In dynamic version, its size is 640ko and in static : 18 mo. I think the static linking worked successfully.
There is a graphical issue when i starts the program.
When it starts, it ask you to select a folder.
2 screens, one in dynamic and the other, in static :
7585 7586
After that, the program in static version is very ugly... A slider is missing on the IHM. It is strange..
Note : I read somewhere that if I use Thread, it's not useful to make static version because I have to keep one library file, but i don't remember its name.
I tried to start the static version on another computer, and i had an error :
./Tairona-visue: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./Tairona-visue)
But the libc6 is installed in this system, and the distribution is fully up to date...
Thanks in advance for your help, and sorry for my bad english !
I'm trying to make my application portable.
So i want 4 versions :
- 1 static 64 bits
- 1 dynamic 64 bits
And both in 32 bits too.
First, i will do the first group, in 64 bits.
===== DYNAMIC VERSION =====
My program is by default, compiled in dynamic i guess. So, i put the binary file on another computer and trying to run it :
error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory
So i tried to copy the file libQtGui.so.4 from the lib directory, into the folder which contains the binary file. It's the same issue. So I think i forgot something but dunno what.
===== STATIC VERSION =====
I download the library source, and I do these commands :
./configure -static -release -prefix /usr/local/Trolltech/Qt-4.8.1_static
gmake
gmake install
I add manually the static qmake on Qt Creator, i delete the .pro.user and i restart Qt Creator. Now i select the static version of compiler and i compile my application.
In dynamic version, its size is 640ko and in static : 18 mo. I think the static linking worked successfully.
There is a graphical issue when i starts the program.
When it starts, it ask you to select a folder.
2 screens, one in dynamic and the other, in static :
7585 7586
After that, the program in static version is very ugly... A slider is missing on the IHM. It is strange..
Note : I read somewhere that if I use Thread, it's not useful to make static version because I have to keep one library file, but i don't remember its name.
I tried to start the static version on another computer, and i had an error :
./Tairona-visue: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./Tairona-visue)
But the libc6 is installed in this system, and the distribution is fully up to date...
Thanks in advance for your help, and sorry for my bad english !