Re: [AD] Problems using latest debug version

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Grzegorz Adam Hankiewicz <gradha@xxxxxxxxxx> writes:

> gcc -L/usr/X11R6/lib  -o demo/demo obj/unix/demo.o -Llib/unix
> -lalld-3.9.34 -lalld_unsharable -lm -lvga -lggi -lXxf86dga -lXxf86vm
> -lXext -lX11 -lasound
> lib/unix/liballd-3.9.34.so: undefined reference to `_read_vga_register'
> lib/unix/liballd-3.9.34.so: undefined reference to `_vsync_out_v'
> lib/unix/liballd-3.9.34.so: undefined reference to `_alter_vga_register'
> lib/unix/liballd-3.9.34.so: undefined reference to `_write_hpp'
> lib/unix/liballd-3.9.34.so: undefined reference to `_vsync_out_h'
> lib/unix/liballd-3.9.34.so: undefined reference to `_write_vga_register'
> lib/unix/liballd-3.9.34.so: undefined reference to `_vsync_in'
> 
> Guess what: if I change -lalld-3.9.34 and -lalld_unsharable to
> -lalleg-3.9.34 and -lalleg_unsharable, the thing works perfectly. Any
> ideas?

I guess this happens because these functions are defined as AL_INLINE
in include/allegro/aintvga.h.  For optimized library these functions
are inlined, but for debugging version they are treated as extern.
Other functions, defined with AL_INLINE in "allegro.h" and
"allegro/aintern.h" are also compiled into library as normal functions
in src/inline.c, but these VGA/MODEX functions defined in
include/allegro/aintvga.h are not included as normal functions.

-- 
Michael Bukin



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/