2014-10-22 2 views
0

Linux Mint 17 x86_64를 사용하고 있으며 수정 된 라이브러리를 컴파일하는 동안 Alfont를 오픈 소스 게임 Open Algege (Allegro 라이브러리 기반)로 컴파일 중입니다.Linux Mint에서 Open Surge 컴파일 관련 문제 17 x86_64 : 호환되지 않는 라이브러리 건너 뛰기

[email protected] ~/opensnc-code-opensurge/alfont $ gcc -fPIC -DPIC -O2 -m32 -Iinclude `freetype-config --cflags` -o src/alfont.o -c src/alfont.csrc/alfont.c: In function ‘alfont_ugetx’: 
src/alfont.c:3765:4: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default] 
    ugetxc((char**)s); 
    ^
src/alfont.c:3765:4: note: expected ‘const char **’ but argument is of type ‘char **’ 
src/alfont.c:3767:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default] 
    ugetxc((char**)s); 
^
src/alfont.c:3767:2: note: expected ‘const char **’ but argument is of type ‘char **’ 
src/alfont.c:3771:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default] 
    ugetxc(&lpszWS); 
^
src/alfont.c:3771:2: note: expected ‘const char **’ but argument is of type ‘char **’ 
src/alfont.c:3773:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default] 
    ugetxc(&lpszWS); 
^
src/alfont.c:3773:2: note: expected ‘const char **’ but argument is of type ‘char **’ 
src/alfont.c:3818:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default] 
    ugetxc((char**)s); 
^
src/alfont.c:3818:2: note: expected ‘const char **’ but argument is of type ‘char **’ 
src/alfont.c:3820:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default] 
    ugetxc((char**)s); 
^
src/alfont.c:3820:2: note: expected ‘const char **’ but argument is of type ‘char **’ 
src/alfont.c: In function ‘alfont_ugetxc’: 
src/alfont.c:4087:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default] 
    ugetxc(&lpszWS); 
^
src/alfont.c:4087:2: note: expected ‘const char **’ but argument is of type ‘char **’ 
src/alfont.c:4089:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default] 
    ugetxc(&lpszWS); 
^
src/alfont.c:4089:2: note: expected ‘const char **’ but argument is of type ‘char **’ 

이러한 문제는 그리 심각하지 않다고 생각합니다. 하지만 다음 단계에서 다음 오류가 발생합니다.

[email protected] ~/opensnc-code-opensurge/alfont $ gcc -O2 -m32 -shared -Wl,-soname,libalfont.so.2 -o libalfont.so.2.0.9 src/alfont.o `freetype-config --libs` `allegro-config --libs |sed 's/-lalleg_unsharable//'` 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libfreetype.so when searching for -lfreetype 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libfreetype.a when searching for -lfreetype 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libfreetype.so when searching for -lfreetype 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libfreetype.a when searching for -lfreetype 
/usr/bin/ld: cannot find -lfreetype 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libz.so when searching for -lz 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libz.a when searching for -lz 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libz.so when searching for -lz 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libz.a when searching for -lz 
/usr/bin/ld: cannot find -lz 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libpng12.so when searching for -lpng12 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libpng12.a when searching for -lpng12 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libpng12.so when searching for -lpng12 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libpng12.a when searching for -lpng12 
/usr/bin/ld: cannot find -lpng12 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/liballeg.so when searching for -lalleg 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/liballeg.so when searching for -lalleg 
/usr/bin/ld: cannot find -lalleg 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.so when searching for -lc 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.a when searching for -lc 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.so when searching for -lc 
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.a when searching for -lc 
collect2: error: ld returned 1 exit status 

호환되지 않는 라이브러리로 이러한 오류를 수정하는 방법을 알려주십시오.

답변

1

문제는 64 비트 시스템에서 32 비트 바이너리를 컴파일하려고합니다.

한 가지 해결책은 네이티브 64 비트 라이브러리를 사용할 수있는 대신 64 비트 바이너리를 컴파일하는 것일 수 있습니다.

32 비트 바이너리로 컴파일해야하는 경우 32 비트 라이브러리를 모두 설치해야합니다. 또한 freetype-config 및 allegro-config 프로그램이 32 비트 버전의 라이브러리를 가리키는 지 확인해야합니다.

+0

감사합니다. 나는 * -m32 * 플래그를 프로젝트를 컴파일하는 데 사용한 명령에서 * -m64 *로 변경했으며 작동합니다! –

관련 문제