
![]()
Už minule som si stiahol najnovšie qt zo stránky vývojárov, ale po nainštalovaní nešlo kompilovať ani len príklady. Prvýkrát som manuálne pridal linky na požadované libky a hneď to išlo. Tentokrát som ale lenivý a spravil som na to skript, takže po jeho spustení všetko funguje, ako má. Použitie je veľmi jednoduché.Popis
Skript je pekne komentovaný a dúfam, že aj dostatočne bezpečný, takže by vám nemal nič pokaziť (mne nepokazil
) Ak nájdete chybu, alebo vylepšenie, napíšte to do komentára. Ďakujem.
Usage:
Stáčí ako bežne
chmod u+x subor.sh sudo ./subor.sh
Samotný skript:
#!/bin/bash #creates lib dependencies for QT or # if you like, also lib dependencies for other programs, if you customize $libs variable # author: Marcel Kanta # licence: LGPL like QT 4.5 path="/usr/lib/" # change if you have to, or try default #insert your required libraries from Compile Output, or shell query libs='-lfreetype -lgobject-2.0 -lSM -lICE -pthread -pthread -lXrender -lfontconfig -lXext -lX11 -lQtCore -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread' # dont't change anything under this line, only if you know, # what you are doing. #---------------------------------------------------------------- echo $libs |sed 's/-l/\n-l/g'|grep "^-l"|colrm 1 2|cut -d " " -f 1| while read f; do # here we have list of libs in format like "libfreetype" # here we check if the lib exist and if the answer is yes and # there doesn't exist .so extention, it creates a link. #it's rather safe. for i in $(seq 9 -1 0); do if [ -e $path"lib$f.so.$i" ]; then if [ ! -e $path"lib$f.so" ]; then echo $f to do; ln -s $path"lib"$f.so.$i $path"lib"$f.so; # what and where fi; continue; fi; done done;
English version:
quick fix: see code above
Last 5 posts by marcello
- O tom, prečo sa použitie bing rozmáha - October 31st, 2009
- T-mobile internet na Ubuntu - July 10th, 2009
- Ubuntu battery script 2.0 - May 9th, 2009
- Pokazený Zune 30GB - January 1st, 2009
- Zvýšte výdrž baterky na Linuxe - October 20th, 2008
0 Response to “Kompilácia programov v qt 4.5 pod Ubuntu”