Hi, Curt and anybody active here.
I am trying to compile your code but one error showed up. Do u know the reason?
I am using cygwin under Windows XP. I can compile Jung's code with arm-linux-gcc, but got errors while compiling your code.
I guess that the zlib directory is not set up right. But the strange thing is I tried to include <zlib.h> in a hello.c file and tried compile it with gcc, there is no error. The error showed up when I tried to compile a hello.c with arm-linux-gcc
Thanks
-----My error infor---------------------------
$ make
Making all in src
make[1]: Entering directory `/home/CSOIS/AppStargate/MicroGear-1.3.1/src'
Making all in comms
make[2]: Entering directory `/home/CSOIS/AppStargate/MicroGear-1.3.1/src/comms'
if arm-linux-g++ -DHAVE_CONFIG_H -I. -I. -I../../src/include -I../../src -Wal
l -O2 -MT logging.o -MD -MP -MF ".deps/logging.Tpo" -c -o logging.o logging.cpp;
\
then mv -f ".deps/logging.Tpo" ".deps/logging.Po"; else rm -f ".deps/log
ging.Tpo"; exit 1; fi
logging.cpp:5:18: zlib.h: No such file or directory
logging.cpp:13: error: syntax error before `=' token
logging.cpp:14: error: syntax error before `=' token
logging.cpp:15: error: syntax error before `=' token
logging.cpp:16: error: syntax error before `=' token
logging.cpp:17: error: syntax error before `=' token
logging.cpp: In function `bool logging_init()':
logging.cpp:76: error: `fimu' undeclared (first use this function)
logging.cpp:76: error: (Each undeclared identifier is reported only once for
each function it appears in.)
logging.cpp:76: error: `gzopen' undeclared (first use this function)
logging.cpp:82: error: `fgps' undeclared (first use this function)
logging.cpp:88: error: `fnav' undeclared (first use this function)
logging.cpp:94: error: `fservo' undeclared (first use this function)
logging.cpp💯 error: `fhealth' undeclared (first use this function)
logging.cpp: In function `bool logging_close()':
logging.cpp:112: error: `gzclose' undeclared (first use this function)
logging.cpp: In function `void log_gps(gps*)':
logging.cpp:123: error: `gzwrite' undeclared (first use this function)
logging.cpp: In function `void log_imu(imu*)':
logging.cpp:128: error: `gzwrite' undeclared (first use this function)
logging.cpp: In function `void log_nav(nav*)':
logging.cpp:133: error: `gzwrite' undeclared (first use this function)
logging.cpp: In function `void log_servo(servo*)':
logging.cpp:138: error: `gzwrite' undeclared (first use this function)
logging.cpp: In function `void log_health(health*)':
logging.cpp:143: error: `gzwrite' undeclared (first use this function)
logging.cpp: In function `void flush_gps()':
logging.cpp:149: error: `Z_SYNC_FLUSH' undeclared (first use this function)
logging.cpp:149: error: `gzflush' undeclared (first use this function)
logging.cpp: In function `void flush_imu()':
logging.cpp:155: error: `gzflush' undeclared (first use this function)
logging.cpp: In function `void flush_nav()':
logging.cpp:161: error: `gzflush' undeclared (first use this function)
logging.cpp: In function `void flush_servo()':
logging.cpp:167: error: `gzflush' undeclared (first use this function)
logging.cpp: In function `void flush_health()':
logging.cpp:173: error: `gzflush' undeclared (first use this function)
logging.cpp: In function `void display_message(imu*, gps*, nav*, servo*,
health*)':
logging.cpp:189: warning: initialization to `int' from `double'
logging.cpp:189: warning: argument to `int' from `double'
logging.cpp:191: warning: initialization to `int' from `double'
logging.cpp:191: warning: argument to `int' from `double'
logging.cpp:193: warning: initialization to `int' from `double'
logging.cpp:193: warning: argument to `int' from `double'
make[2]: *** [logging.o] Error 1
make[2]: Leaving directory `/home/CSOIS/AppStargate/MicroGear-1.3.1/src/comms'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/CSOIS/AppStargate/MicroGear-1.3.1/src'
make: *** [all-recursive] Error 1
--------------------------------
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As long as zlib.h is located in one of the include directories that the compiler is searching, it should find it. But I've never tried to do this with cygwin so I don't know if there's anything odd there that might cause problems. But it sounds like you just need to get the compiler looking for files in the right directories.
Regards,
Curt.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, Curt and anybody active here.
I am trying to compile your code but one error showed up. Do u know the reason?
I am using cygwin under Windows XP. I can compile Jung's code with arm-linux-gcc, but got errors while compiling your code.
I guess that the zlib directory is not set up right. But the strange thing is I tried to include <zlib.h> in a hello.c file and tried compile it with gcc, there is no error. The error showed up when I tried to compile a hello.c with arm-linux-gcc
Thanks
-----My error infor---------------------------
$ make
Making all in src
make[1]: Entering directory `/home/CSOIS/AppStargate/MicroGear-1.3.1/src'
Making all in comms
make[2]: Entering directory `/home/CSOIS/AppStargate/MicroGear-1.3.1/src/comms'
if arm-linux-g++ -DHAVE_CONFIG_H -I. -I. -I../../src/include -I../../src -Wal
l -O2 -MT logging.o -MD -MP -MF ".deps/logging.Tpo" -c -o logging.o logging.cpp;
\
then mv -f ".deps/logging.Tpo" ".deps/logging.Po"; else rm -f ".deps/log
ging.Tpo"; exit 1; fi
logging.cpp:5:18: zlib.h: No such file or directory
logging.cpp:13: error: syntax error before `=' token
logging.cpp:14: error: syntax error before `=' token
logging.cpp:15: error: syntax error before `=' token
logging.cpp:16: error: syntax error before `=' token
logging.cpp:17: error: syntax error before `=' token
logging.cpp: In function `bool logging_init()':
logging.cpp:76: error: `fimu' undeclared (first use this function)
logging.cpp:76: error: (Each undeclared identifier is reported only once for
each function it appears in.)
logging.cpp:76: error: `gzopen' undeclared (first use this function)
logging.cpp:82: error: `fgps' undeclared (first use this function)
logging.cpp:88: error: `fnav' undeclared (first use this function)
logging.cpp:94: error: `fservo' undeclared (first use this function)
logging.cpp💯 error: `fhealth' undeclared (first use this function)
logging.cpp: In function `bool logging_close()':
logging.cpp:112: error: `gzclose' undeclared (first use this function)
logging.cpp: In function `void log_gps(gps*)':
logging.cpp:123: error: `gzwrite' undeclared (first use this function)
logging.cpp: In function `void log_imu(imu*)':
logging.cpp:128: error: `gzwrite' undeclared (first use this function)
logging.cpp: In function `void log_nav(nav*)':
logging.cpp:133: error: `gzwrite' undeclared (first use this function)
logging.cpp: In function `void log_servo(servo*)':
logging.cpp:138: error: `gzwrite' undeclared (first use this function)
logging.cpp: In function `void log_health(health*)':
logging.cpp:143: error: `gzwrite' undeclared (first use this function)
logging.cpp: In function `void flush_gps()':
logging.cpp:149: error: `Z_SYNC_FLUSH' undeclared (first use this function)
logging.cpp:149: error: `gzflush' undeclared (first use this function)
logging.cpp: In function `void flush_imu()':
logging.cpp:155: error: `gzflush' undeclared (first use this function)
logging.cpp: In function `void flush_nav()':
logging.cpp:161: error: `gzflush' undeclared (first use this function)
logging.cpp: In function `void flush_servo()':
logging.cpp:167: error: `gzflush' undeclared (first use this function)
logging.cpp: In function `void flush_health()':
logging.cpp:173: error: `gzflush' undeclared (first use this function)
logging.cpp: In function `void display_message(imu*, gps*, nav*, servo*,
health*)':
logging.cpp:189: warning: initialization to `int' from `double'
logging.cpp:189: warning: argument to `int' from `double'
logging.cpp:191: warning: initialization to `int' from `double'
logging.cpp:191: warning: argument to `int' from `double'
logging.cpp:193: warning: initialization to `int' from `double'
logging.cpp:193: warning: argument to `int' from `double'
make[2]: *** [logging.o] Error 1
make[2]: Leaving directory `/home/CSOIS/AppStargate/MicroGear-1.3.1/src/comms'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/CSOIS/AppStargate/MicroGear-1.3.1/src'
make: *** [all-recursive] Error 1
--------------------------------
As long as zlib.h is located in one of the include directories that the compiler is searching, it should find it. But I've never tried to do this with cygwin so I don't know if there's anything odd there that might cause problems. But it sounds like you just need to get the compiler looking for files in the right directories.
Regards,
Curt.