Na, this didnt work either: I got this kind of errors. Like the days before as I have tried to get it working:
g++ -O3 -ftree-vectorize -ffast-math -std=c++0x -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings -I/ -c main.cpp
main.cpp: In function ‘void read_raw_msgs(std::vector<demodulator*>*, char*)’:
main.cpp:41:36: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
while((x=strsep(&dp, " ")) && len<sizeof(dbuf)) {
~~~^~~~~~~~~~~~~
main.cpp:45:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<demodulator*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for(int n=0;n<demods->size();n++) {
~^~~~~~~~~~~~~~~
main.cpp: In function ‘int main(int, char**)’:
main.cpp:232:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<demodulator*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for(int n=0;n<demods.size();n++)
~^~~~~~~~~~~~~~
g++ -O3 -ftree-vectorize -ffast-math -std=c++0x -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings -I/ -c engine.cpp
g++ -O3 -ftree-vectorize -ffast-math -std=c++0x -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings -I/ -c dsp_stuff.cpp
g++ -O3 -ftree-vectorize -ffast-math -std=c++0x -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings -I/ -c fm_demod.cpp
fm_demod.cpp: In member function ‘void fsk_demod::process(int16_t*, int)’:
fm_demod.cpp:38:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<demodulator*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for(int n=0;n<demods->size();n++) {
~^~~~~~~~~~~~~~~
fm_demod.cpp:48:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<demodulator*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for(int n=0;n<demods->size();n++)
~^~~~~~~~~~~~~~~
g++ -O3 -ftree-vectorize -ffast-math -std=c++0x -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings -I/ -c decoder.cpp
decoder.cpp: In member function ‘virtual void decoder::execute_handler(sensordata_t&)’:
decoder.cpp:73:29: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘uint64_t’ {aka ‘long unsigned int’} -Wformat=]
snprintf(cmd,sizeof(cmd),"%s %04llx %+.1f %g %i %i %i %i %li",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
decoder.cpp:75:6:
nid, d.temp, d.humidity,
~~~
decoder.cpp:83:29: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘uint64_t’ {aka ‘long unsigned int’} -Wformat=]
snprintf(cmd,sizeof(cmd),"%s %013llx %+.1f %g %i %i %i %i %li",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
decoder.cpp:85:6:
nid, d.temp, d.humidity,
~~~
g++ -O3 -ftree-vectorize -ffast-math -std=c++0x -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings -I/ -c crc8.cpp
g++ -O3 -ftree-vectorize -ffast-math -std=c++0x -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings -I/ -c tfa1.cpp
g++ -O3 -ftree-vectorize -ffast-math -std=c++0x -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings -I/ -c tfa2.cpp
tfa2.cpp: In member function ‘void tfa2_decoder::flush_tx22(int, int)’:
tfa2.cpp:207:10: warning: ‘crc_calc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
printf("TX22(%02x) BAD %i RSSI %i Offset %.0lfkHz (CRC %02x %02x) len %i\n",1<<type,bad,rssi,
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-1536.0*offset/131072,
~~~~~~~~~~~~~~~~~~~~~~
crc_val,crc_calc,byte_cnt);
~~~~~~~~~~~~~~~~~~~~~~~~~~
tfa2.cpp:207:10: warning: ‘crc_val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
g++ -O3 -ftree-vectorize -ffast-math -std=c++0x -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings -I/ -c utils.cpp
g++ -O3 -ftree-vectorize -ffast-math -std=c++0x -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings -I/ -c sdr.cpp
sdr.cpp: In static member function ‘static int sdr::search_device(char*)’:
sdr.cpp:93:29: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 254 and 764 [-Wformat-truncation=]
snprintf(sum,sizeof(sum),"%s %s SN%s",vendor, product, serial);
^~~~~~~~~~~~ ~~~~~~
sdr.cpp:93:12: note: ‘snprintf’ output between 5 and 770 bytes into a destination of size 768
snprintf(sum,sizeof(sum),"%s %s SN%s",vendor, product, serial);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -O3 -ftree-vectorize -ffast-math -std=c++0x -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings -I/ -c whb.cpp
whb.cpp: In member function ‘void whb_decoder::decode_02(uint8_t*, uint64_t, int, int)’:
whb.cpp:121:10: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
printf("WHB02 ID %llx TEMP %g, PTEMP %g\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
id, cvt_temp(temp), cvt_temp(temp_prev));
~~
whb.cpp: In member function ‘void whb_decoder::decode_03(uint8_t*, uint64_t, int, int)’:
whb.cpp:150:10: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
printf("WHB03 ID %llx TEMP %g HUM %i, PTEMP %g PHUM %i\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
id, cvt_temp(temp), hum, cvt_temp(temp_prev), hum_prev);
~~
whb.cpp: In member function ‘void whb_decoder::decode_04(uint8_t*, uint64_t, int, int)’:
whb.cpp:180:10: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
printf("WHB04 ID %llx TEMP %g HUM %i WET %i, PTEMP %g PHUM %i PWET %i\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
id, cvt_temp(temp),hum,(wet&1)^1, cvt_temp(temp_prev), hum_prev, (wet_prev&1)^1);
~~
whb.cpp: In member function ‘void whb_decoder::decode_06(uint8_t*, uint64_t, int, int)’:
whb.cpp:214:10: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
printf("WHB06 ID %llx TEMP %g HUM %i TEMP2 %g, PTEMP %g PHUM %i PTEMP2 %g\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
id, cvt_temp(temp),hum,cvt_temp(temp2), cvt_temp(temp_prev), hum_prev, cvt_temp(temp2_prev));
~~
whb.cpp: In member function ‘void whb_decoder::decode_07(uint8_t*, uint64_t, int, int)’:
whb.cpp:247:10: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
printf("WHB07 ID %llx TEMP_IN %g HUM_IN %i TEMP_OUT %g HUM_OUT %i",id, cvt_temp(temp[0]), hum[0], cvt_temp(temp[1]), hum[1]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
whb.cpp: In member function ‘void whb_decoder::decode_08(uint8_t*, uint64_t, int, int)’:
whb.cpp:282:10: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
printf("WHB08 ID %llx cnt %i\n",id, cnt);
^~~~~~~~~~~~~~~~~~~~~~~~ ~~
whb.cpp:289:11: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
printf("WHB08 ID %llx #%i time %i\n",id,i,times[i]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
whb.cpp: In member function ‘void whb_decoder::decode_0b(uint8_t*, uint64_t, int, int)’:
whb.cpp:319:27: warning: suggest parentheses around ‘+’ in operand of ‘&’ [-Wparentheses]
speed[i]= ((v>>16)&0xff + 256*((v>>25)&1))/10.0;
~~~~~^~~~~~~~~~~~~~~~~
whb.cpp:320:26: warning: suggest parentheses around ‘+’ in operand of ‘&’ [-Wparentheses]
gust[i]= ((v>>8)&0xff + 256*((v>>24)&1))/10.0;
~~~~~^~~~~~~~~~~~~~~~~
whb.cpp:323:11: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
printf("WHB0b ID %llx #%i DIR %f SPEED %f GUST %f time %i\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
id, i,dir[i],speed[i],gust[i],times[i]);
~~
whb.cpp: In member function ‘void whb_decoder::decode_10(uint8_t*, uint64_t, int, int)’:
whb.cpp:357:11: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
printf("WHB10 ID %llx #%i %i %i\n",id,i,state[i],times[i]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
whb.cpp: In member function ‘void whb_decoder::decode_11(uint8_t*, uint64_t, int, int)’:
whb.cpp:386:10: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
printf("WHB11 %llx TEMP1 %g HUM1 %i TEMP2 %g HUM2 %i TEMP3 %g HUM3 %i TEMP_IN %g HUM_IN %i",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
id, cvt_temp(temp[0]),hum[0], cvt_temp(temp[1]),hum[1], cvt_temp(temp[2]),hum[2], cvt_temp(temp[3]),hum[3]);
~~
whb.cpp: In member function ‘void whb_decoder::decode_12(uint8_t*, uint64_t, int, int)’:
whb.cpp:427:10: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
printf("WHB12 %llx TEMP %g HUM %i HUM3h %i HUM24h %i HUM7d %i HUM30d %i\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
id, cvt_temp(temp), hum[0], hum[1], hum[2], hum[3], hum[4]);
~~
g++ -O3 -ftree-vectorize -ffast-math -std=c++0x -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-write-strings -I/ -c crc32.cpp
g++ -rdynamic -o tfrec main.o engine.o dsp_stuff.o fm_demod.o decoder.o crc8.o tfa1.o tfa2.o utils.o sdr.o whb.o crc32.o -lm -L -lrtlsdr -lpthread
/usr/bin/ld: sdr.o: in function `sdr::read_thread()':
sdr.cpp:(.text+0xf0): undefined reference to `rtlsdr_read_async'
/usr/bin/ld: sdr.o: in function `sdr::sdr(int, int, int, char*)':
sdr.cpp:(.text+0x314): undefined reference to `rtlsdr_get_device_usb_strings'
/usr/bin/ld: sdr.cpp:(.text+0x3ac): undefined reference to `rtlsdr_open'
/usr/bin/ld: sdr.cpp:(.text+0x3c4): undefined reference to `rtlsdr_set_freq_correction'
/usr/bin/ld: sdr.o: in function `sdr::~sdr()':
sdr.cpp:(.text+0x4b8): undefined reference to `rtlsdr_cancel_async'
/usr/bin/ld: sdr.o: in function `sdr::search_device(char*)':
sdr.cpp:(.text+0x550): undefined reference to `rtlsdr_get_device_count'
/usr/bin/ld: sdr.cpp:(.text+0x5e0): undefined reference to `rtlsdr_get_device_usb_strings'
/usr/bin/ld: sdr.o: in function `sdr::start()':
sdr.cpp:(.text+0x6c4): undefined reference to `rtlsdr_reset_buffer'
/usr/bin/ld: sdr.o: in function `sdr::stop()':
sdr.cpp:(.text+0x7ac): undefined reference to `rtlsdr_cancel_async'
/usr/bin/ld: sdr.o: in function `sdr::set_frequency(unsigned int)':
sdr.cpp:(.text+0x864): undefined reference to `rtlsdr_set_center_freq'
/usr/bin/ld: sdr.o: in function `sdr::nearest_gain(int)':
sdr.cpp:(.text+0x8f0): undefined reference to `rtlsdr_set_tuner_gain_mode'
/usr/bin/ld: sdr.cpp:(.text+0x904): undefined reference to `rtlsdr_get_tuner_gains'
/usr/bin/ld: sdr.cpp:(.text+0x924): undefined reference to `rtlsdr_get_tuner_gains'
/usr/bin/ld: sdr.o: in function `sdr::set_gain(int, float)':
sdr.cpp:(.text+0x9ec): undefined reference to `rtlsdr_set_tuner_gain_mode'
/usr/bin/ld: sdr.cpp:(.text+0xa44): undefined reference to `rtlsdr_set_tuner_gain_mode'
/usr/bin/ld: sdr.cpp:(.text+0xa50): undefined reference to `rtlsdr_set_tuner_gain'
/usr/bin/ld: sdr.o: in function `sdr::set_ppm(int)':
sdr.cpp:(.text+0xab0): undefined reference to `rtlsdr_set_freq_correction'
/usr/bin/ld: sdr.o: in function `sdr::set_samplerate(int)':
sdr.cpp:(.text+0xaf4): undefined reference to `rtlsdr_set_sample_rate'
collect2: error: ld returned 1 exit status
make: *** [Makefile.arm:28: tfrec] Error 1