Decawave / uwb-apps

Apache License 2.0
34 stars 31 forks source link

Compiling the rtdoa_node and rtdoa_tag examples fails #17

Open seijikun opened 3 years ago

seijikun commented 3 years ago

When compiling the rtdoa_node or the rtdoa_tag example, I get compile errors.

Software-Versions:

Hardware: DWM1001

Error:

Error: repos/decawave-uwb-core/lib/uwb_pan/src/uwb_pan.c: In function 'handle_pan_request':
repos/decawave-uwb-core/lib/uwb_pan/src/uwb_pan.c:353:48: error: taking address of packed member of 'struct _pan_frame_t' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  353 |     if (pan->request_cb(request->long_address, &request->req, &response->req)) {
      |                                                ^~~~~~~~~~~~~
repos/decawave-uwb-core/lib/uwb_pan/src/uwb_pan.c:353:63: error: taking address of packed member of 'struct _pan_frame_t' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  353 |     if (pan->request_cb(request->long_address, &request->req, &response->req)) {
      |                                                               ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
seijikun commented 3 years ago

Adding "-Wno-error=address-of-packed-member" to the cflags of the two examples makes them compile, and it seems to work, at least.

thejclark96 commented 2 years ago

Adding "-Wno-error=address-of-packed-member" to the cflags of the two examples makes them compile, and it seems to work, at least.

Where exactly do you go to do this?