[gpm] alps error workaround
Andrea Dieni
andrea.dieni@tin.it
Wed, 16 Apr 2003 16:47:00 +0200
gcc -I/tmp/gpm-1.20.1/src -DHAVE_CONFIG_H -include headers/config.h -Wall=
-DSYSCONFDIR=3D"\"/usr/etc\"" -DSBINDIR=3D"\"/usr/sbin\"" -g -O2 -c -o =
prog/mouse-test.o
prog/mouse-test.c
gcc -L/tmp/gpm-1.20.1/src -o prog/mouse-test prog/mouse-test.o mice.o tw=
iddler.o
synaptics.o lib/libgpm.so lib/libgpm.a
mice.o(.text+0x1c9d): In function `M_alps_ps2':
/tmp/gpm-1.20.1/src/mice.c:1214: undefined reference to `alps_process_ps2=
_data'
mice.o(.text+0x30c6): In function `I_alps2':
/tmp/gpm-1.20.1/src/mice.c:1966: undefined reference to `alps_ps2_init'
collect2: ld returned 1 exit status
make[1]: *** [prog/mouse-test] Error 1
rm prog/hltest.o prog/mev.o prog/mouse-test.o
make[1]: Leaving directory `/tmp/gpm-1.20.1/src'
make: *** [do-all] Error 1
This the error message and the last two commands.
Is a linker problem.
I found a workarond.
After this error do the following:
1. cd /to/gpm/root
2. gcc -I/tmp/gpm-1.20.1/src -DHAVE_CONFIG_H -include headers/config.h -W=
all
-DSYSCONFDIR=3D"\"/usr/etc\"" -DSBINDIR=3D"\"/usr/sbin\"" -g -O2 -c -o =
prog/mouse-test.o
prog/mouse-test.c
no changes here simply compile mouse-test.c
3. gcc -L/tmp/gpm-1.20.1/src -o prog/mouse-test prog/mouse-test.o mice.o=
twiddler.o synaptics.o alps.o lib/libgpm.so lib/libgpm.a
here is the workaround - try to link mouse-test.o but fails cause
can't find functions in alps.o so you just need to add alps.o
4. make (to finish the process)
The question is: how can I tell to Makefile to use alps.o during the link=
step?
Thanks for your help