cubehub / doppler

Command line utility that takes IQ data stream as input and produces doppler corrected output stream based on TLE
MIT License
51 stars 13 forks source link

Compiling on ARM fails because uint8_t is an unknown type #1

Closed ghost closed 9 years ago

ghost commented 9 years ago

I'll give the solution first, always nice to have a fix before knowing the problem: I added "#include " to the top of demod.c and it now compiles without any errors.

The problem was when compiling on ARM architecture I got the following: root@bananapi ~/src/demod/build (git)-[master] # make Scanning dependencies of target demod [100%] Building C object CMakeFiles/demod.dir/demod.c.o /root/src/demod/demod.c: In function ‘main’: /root/src/demod/demod.c:190:2: error: unknown type name ‘uint8_t’ uint8_t iq_buffer[INPUT_BUF_SIZE]; ^ /root/src/demod/demod.c:241:13: error: ‘uint8_t’ undeclared (first use in this function) fwrite((uint8t)dem_out, 1, resampler_output_count_4, stdout); ^ /root/src/demod/demod.c:241:13: note: each undeclared identifier is reported only once for each function it appears in /root/src/demod/demod.c:241:21: error: expected expression before ‘)’ token fwrite((uint8t)dem_out, 1, resampler_output_count_4, stdout); ^ /root/src/demod/demod.c:241:5: error: too few arguments to function ‘fwrite’ fwrite((uint8t)dem_out, 1, resampler_output_count_4, stdout); ^ /root/src/demod/demod.c:257:21: error: expected expression before ‘)’ token fwrite((uint8t)dem_out, 1, resampler_output_count_2, stdout); ^ /root/src/demod/demod.c:257:5: error: too few arguments to function ‘fwrite’ fwrite((uint8t)dem_out, 1, resampler_output_count_2, stdout); ^ CMakeFiles/demod.dir/build.make:54: recipe for target 'CMakeFiles/demod.dir/demo d.c.o' failed make[2]: * [CMakeFiles/demod.dir/demod.c.o] Error 1 CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/demod.dir/all' failed make[1]: * [CMakeFiles/demod.dir/all] Error 2 Makefile:117: recipe for target 'all' failed make: *\ [all] Error 2 root@bananapi ~/src/demod/build (git)-[master] #

andresv commented 9 years ago

Wait a minute, error describes demod tool not doppler. I will fix it also.

andresv commented 9 years ago

Demod also fixed.

ghost commented 9 years ago

Thanks, sorry I had both open in my browser and pasted the error message into to the wrong tab. That include is not needed for doppler. doppler compiles fine under ARM.