Hi,

You have to add the linking flags (-ldirectfb -ldirect -lfusion).

You can see them with 'pkg-config --libs directfb'. This command will
work if /usr/local/lib is in the PKG_CONFIG_PATH environment variable.

BTW, it's better if you send this kind of questions to the users mailing
list.

Regards,
-- 
Pedro Aguilar


On Tue, 2007-11-27 at 21:24 +0900, Susumu Ikeda wrote:
> I'm new to Linux programming.
> I could install DirectFB1.1.0 to my PC with uBuntu-Linux.
> Next I tried to build a sample code in DirectFB tutorials, Simple
> fullscreen application that draws a horizontal line. 
> cc -c -I/urs/local/include/directfb sample1.c     is completed without
> errors.
> cc -o sample1 sample1.o   
> sample1.o: In function `main':
> sample1.c:(.text+0x1e): undefined reference to `DirectFBInit'
> sample1.c:(.text+0x5f): undefined reference to `DirectFBErrorFatal'
> sample1.c:(.text+0x6b): undefined reference to `DirectFBCreate'
> sample1.c:(.text+0xac): undefined reference to `DirectFBErrorFatal'
> sample1.c:(.text+0x107): undefined reference to `DirectFBErrorFatal'
> sample1.c:(.text+0x178): undefined reference to `DirectFBErrorFatal'
> sample1.c:(.text+0x1db): undefined reference to `DirectFBErrorFatal' 
> sample1.c:(.text+0x255): undefined reference to `DirectFBErrorFatal'
> sample1.o:sample1.c:(.text+0x2c8): more undefined references to
> `DirectFBErrorFatal' follow
> collect2:  ld returned 1 exit status 
> 
> I completed following instruction.
> 2) Make sure that "/lib" is listed in your /etc/ld.so.conf. The
> default prefix is "/usr/local".
>  After adding it you have to run 'ldconfig' as superuser.
> 
> I confirmed libdirectfb.so is in /usr/local/lib.
> 
> Would you please give me suggestion how to solve this problem and/or
> how to analyze
> this link trouble.
> 
> Susumu Ikeda 
> 
> _______________________________________________
> directfb-dev mailing list
> [email protected]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev



_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to