Witam
Kompilator:
Kompiluje:
i tu się wywala:
Nie wiem gdzie leży problem, ponieważ mam opcje -lm więc powinno dobrze zlinkować.
Kompilator:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Kompiluje:
tomek@tomek-Ubuntu:~/GPS/testnmea$ make
gcc -I nmea -c -g -lm main.c -o main.o
gcc -I nmea -c -g -lm context.c -o context.o
gcc -I nmea -c -g -lm conversions.c -o conversions.o
gcc -I nmea -c -g -lm generate.c -o generate.o
gcc -I nmea -c -g -lm generator.c -o generator.o
gcc -I nmea -c -g -lm gmath.c -o gmath.o
.
.
.
gcc -I nmea -g -lm main.o context.o conversions.o generate.o generator.o gmath.o info.o parse.o parser.o sentence.o tok.o -o main
i tu się wywala:
home/tomek/GPS/testnmea/gmath.c:98: undefined reference to `sqrt'
gmath.o: In function `nmea_distance':
/home/tomek/GPS/testnmea/gmath.c:131: undefined reference to `sin'
/home/tomek/GPS/testnmea/gmath.c:131: undefined reference to `sin'
Nie wiem gdzie leży problem, ponieważ mam opcje -lm więc powinno dobrze zlinkować.