Closed m1geo closed 9 years ago
George,
There has been a change in gcc where that -if you link to external libraries- you need to put them at the end of the command-line paramters. This should work:
gcc -Wall -o wav2ambe wav2ambe.c -lpthread -lsndfile -lrt
(so the "-l"s have to be put at the end).
I will correct the Makefile, but you can already compile the applications yourself if you apply this trick.
73 kristoff - ON1ARF
Thanks. I will try this tomorrow! :) George M1GEO. Keeper of GB7KH.
Hello.
I'm having trouble building this on Ubuntu. I have the required libraries installed (via libsndfile1-dev on Ubuntu repos).
Any help would be greatly appreciated.
Thanks George M1GEO.
george@marconi:~/voice-ann$ make gcc -Wall -o wav2ambe -lpthread -lsndfile -lrt wav2ambe.c In file included from wav2ambe.c:88:0: serialsend.h: In function ‘funct_serialsend’: serialsend.h:10:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret; ^ In file included from wav2ambe.c:93:0: serialreceive.h: In function ‘funct_serialreceive’: serialreceive.h:305:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret; ^ /tmp/ccLZmQNp.o: In function
main': wav2ambe.c:(.text+0x1b8d): undefined reference to
pthread_create' wav2ambe.c:(.text+0x1c59): undefined reference totimer_create' wav2ambe.c:(.text+0x1cdf): undefined reference to
timer_settime' wav2ambe.c:(.text+0x1d78): undefined reference tosf_open_fd' wav2ambe.c:(.text+0x1dd4): undefined reference to
sf_open' wav2ambe.c:(.text+0x1e4d): undefined reference tosf_close' wav2ambe.c:(.text+0x1e8a): undefined reference to
sf_close' wav2ambe.c:(.text+0x1ec9): undefined reference tosf_close' wav2ambe.c:(.text+0x1f80): undefined reference to
sf_read_short' wav2ambe.c:(.text+0x204c): undefined reference tosf_close' wav2ambe.c:(.text+0x20e1): undefined reference to
timer_settime' collect2: error: ld returned 1 exit status make: *\ [wav2ambe] Error 1 george@marconi:~/voice-ann$