C og libs
Jeg skal lave et C lib men jeg kan ikke rigtigt få det til at virke. Koden er god nok - har teste med en main().min make file
xlong:sublong.s addlong.s xlong.c xlong.h
gcc -c -O1 sublong.s addlong.s xlong.c
ar -r libxlong.a xlong.o addlong.o sublong.o xlong.h
test:test.c xlong.h
gcc -lxlong test.c -o test
nå jeg så prøver at compile test så for jeg det her tilbage
gcc -lxlong test.c -o test
/cygdrive/c/DOCUME~1/Michael/LOCALS~1/Temp/cc33w4Fh.o(.text+0x22):test.c: undefined reference to `XLpushlong'
/cygdrive/c/DOCUME~1/Michael/LOCALS~1/Temp/cc33w4Fh.o(.text+0x32):test.c: undefined reference to `XLpushlong'
/cygdrive/c/DOCUME~1/Michael/LOCALS~1/Temp/cc33w4Fh.o(.text+0x3a):test.c: undefined reference to `XLdumpstack'
/cygdrive/c/DOCUME~1/Michael/LOCALS~1/Temp/cc33w4Fh.o(.text+0x3f):test.c: undefined reference to `XLmult'
/cygdrive/c/DOCUME~1/Michael/LOCALS~1/Temp/cc33w4Fh.o(.text+0x44):test.c: undefined reference to `XLdumpstack'
collect2: ld returned 1 exit status
make: *** [test] Error 1
Jeg kører cygwinpå WinXP
nogle gode forslag?
