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
호환되지 않는 라이브러리로 이러한 오류를 수정하는 방법을 알려주십시오.
감사합니다. 나는 * -m32 * 플래그를 프로젝트를 컴파일하는 데 사용한 명령에서 * -m64 *로 변경했으며 작동합니다! –