digidotcom / xbee_ansic_library

A collection of portable ANSI C code for communicating with Digi International's XBee wireless radio modules in API mode.
204 stars 116 forks source link

Compile Error Linux make: *** [../common/common.mk:103: ipv4_client] Error 1 #37

Closed aylashiv closed 5 months ago

aylashiv commented 6 months ago

Hi Digi,

I'm trying to compile the XBee C SDK on a Linux machine, the error is throwing as follows,

Screenshot from 2024-02-21 16-52-23

Could you help me to resolve the same, the machine is ARM-32 Cortex-A8 AM335X.

Thanks, Shiva.A

tomlogic commented 6 months ago

I think that changing the declaration of _ttystate_orig in both ports/posix/xbee_readline.c and samples/posix/xbee_term_posix.c to include the static keyword should address that linking error.

static struct termios _ttystate_orig;

I was unable to reproduce the linker error in a test compile on macOS, but adding static didn't cause any compiler errors.

If that fixes your problem, I'll push a fix up to the repository. Thanks for reporting it.

aylashiv commented 5 months ago

Solved!! Thanks.