급해요 도와주세요 ㅠDirectFB 소스 컴파일 중 에러
아래 페이지의 DirectFB 소스를 컴파일해보려고
http://linuxspot.tistory.com/archive/200909?page=2
컴파일했는데
kimsanga@kimsanga-HP:~$ gcc `directfb-config --cflags --libs` -oimage image.c
/tmp/ccG2VOyo.o: In function `main':
image.c:(.text+0x2d): undefined reference to `DirectFBInit'
image.c:(.text+0x68): undefined reference to `DirectFBErrorFatal'
image.c:(.text+0x72): undefined reference to `DirectFBCreate'
image.c:(.text+0xad): undefined reference to `DirectFBErrorFatal'
image.c:(.text+0x104): undefined reference to `DirectFBErrorFatal'
image.c:(.text+0x171): undefined reference to `DirectFBErrorFatal'
image.c:(.text+0x1cd): undefined reference to `DirectFBErrorFatal'
image.c:(.text+0x25e): undefined reference to `DirectFBErrorFatal'
/tmp/ccG2VOyo.o:image.c:(.text+0x2c9): more undefined references to `DirectFBErrorFatal' follow
collect2: ld returned 1 exit status
이렇게 에러가 나네요
directfb.h 헤더는 찾는 것 같은데 왜 안되는 것일까요?
경로의 문제 같은데 어디의 어느 파일의 경로를 어떻게 바꾸어 주어야 할 지를 모르겠습니다
경로문제가 아니라면 혹시 무언가 설치를 덜하거나 잘못했나요?
작업환경은 Ubuntu 12.04 LTS이구요
Ubuntu설치 뒤에
sudo apt-get install build-essential
sudo apt-get install libgtk2.0-dev
sudo apt-get install linux-source
sudo apt-get install build-dep linux
sudo apt-get install build-dep libdirectfb-1.2-9
sudo apt-get install aptitude
한 뒤
DirectFB-1.2.9 다운 받아 ./configure, make, make install 해주었습니다
링크에러는 헤더하고는 상관없습니다
간단하게
DirectFBInit
이 함수가 들어있는 라이브러리가 링크가 안된겁니다.
아마
-ldirectfb로 지정해야 할겁니다.
그리고.
libdirectfb-1.2-9
패키지로 설치하고 소스 컴파일해서 설치하는건 문제가 있을수 있습니다
패키지로 설치했으면
libdirectfb-1.2-9하고 libdirectfb-dev-1.2-9(?)
인가만 깔고 소스설치는 안하든가
패키지 설치 안하고 소스로만 설치하는가 하는게 좋습니다
즐린
댓글 달기