剛開始Löve,我很喜歡它! 我目前正在Ubuntu 14.04下測試它。libturbojpeg編譯愛的問題-0.9.2
我能夠編譯愛0.8.0沒有麻煩,但我有問題編譯0.9.2從bitbucket。 看來,我可能已經eaten by a grue...
我得到了鏈接時,由於libturbojpeg
此錯誤:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libturbojpeg.a(libturbojpeg_la-turbojpeg.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
據this StackOverflow entry,似乎是通過安裝在Ubuntu默認libturbojpeg二進制apt-get的:
[email protected]:~/tomas/love/love-0.9.2-bitbucket$ dpkg -L libjpeg-turbo8-dev | grep libturbojpeg.a
/usr/lib/x86_64-linux-gnu/libturbojpeg.a
[email protected]:~/tomas/love/love-0.9.2-bitbucket$ dpkg -l libjpeg-turbo8-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==================================-======================-======================-=========================================================================
ii libjpeg-turbo8-dev:amd64 1.3.0-0ubuntu2 amd64 Development files for the IJG JPEG library
不與-fPIC
編譯,所以我想我得找它的源代碼,與該選項重新編譯它,並修改一些在BUI ld程序löve指向編譯的程序。
我是朝着正確的方向走,還是我錯過了什麼?
問候, 湯姆
PD:我好奇怪,爲什麼要這個庫需要在這種特殊情況下使用-fPIC編譯...
-fPIC
If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the
global offset table. This option makes a difference on the m68k, PowerPC and SPARC.