alps error workaround

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



gcc -I/tmp/gpm-1.20.1/src -DHAVE_CONFIG_H -include headers/config.h -Wall
-DSYSCONFDIR="\"/usr/etc\"" -DSBINDIR="\"/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 twiddler.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 -Wall
-DSYSCONFDIR="\"/usr/etc\"" -DSBINDIR="\"/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



[Index of Archives]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Gimp]     [Yosemite News]