Hi,

just to elaborate on the reply of Srini..

There is more than 1 way..

First way is to compile everything in your application, this is as per 
the reply of Srini.

I take X11 as an example.
If you look in x11.c you will find: DFB_CORE_SYSTEM( x11 )
Which will expand a function with __attribute__((constructor)).
This function will be called automatically:
- when you link in libdirectfb_x11.so
- OR at startup, if have linked this library in.

In other words: if you simply add the x11.o file to your linking stage,
it will register your x11 system module.
To find out what you exactly need to add to your Makefile,
you need to use directfb-config. Or you can edit your own Makefile, of 
course.

Second way is to compile everything in DirectFB, and then link your app 
statically.
simply use ./configure --enable-static.
Select your options carefully as this will bloat your system easily... :)

Greets
Niels

Vijay wrote:
> Hi,
>
> I'm trying to do a static build of the library for arm-linux. DirectFB 
> (1.2.5) compiles fine, then the example applications also compile fine 
> with it. However, when I run any example app, it fails complaining 
> something like this:
> (*) DirectFB/Core: Single Application Core. (2008-10-14 08:20)
> (!) DirectFB/core/system: No system found!
>
> Looking closely at src/core/system.c and lib/direct/modules.c, it looks 
> like the only way system modules can be loaded is when they are built 
> dynamically. In fact, the method direct_modules_explore_directory in 
> lib/direct/modules.c only has code to look for modules when 
> DYNAMIC_LINKING is defined and it only looks for .so modules. Has anyone 
> solved these problems?
>
> Btw, I am using directfb-config to get the right flags and everything 
> does compile fine. It seems like the runtime support for static builds 
> just isn't there.
>
> Any help is appreciated.
> Thanks,
> Vijay
> _______________________________________________
> directfb-dev mailing list
> directfb-dev@directfb.org
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>
>   


-- 

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------" 

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to