From 3b591a3a36233d3108a7abdbbfe0e2db13325250 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Sun, 14 Jan 2024 10:10:40 -0800 Subject: [PATCH] linking with bluetooth library although compiled without linking it because not actually using any methods from the headers --- meson.build | 3 +++ src/beacon.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/meson.build b/meson.build index a13f7b0..2e72485 100644 --- a/meson.build +++ b/meson.build @@ -1,3 +1,6 @@ project('bluetooth-beacon-receiver', 'cpp') executable('bluetooth-beacon', 'src/beacon.cpp') executable('bluetooth-receiver', 'src/receiver.cpp') + +# add libbluetooth +target_link_libraries('bluetooth-beacon' 'bluetooth') diff --git a/src/beacon.cpp b/src/beacon.cpp index 9c6db00..1dfd26f 100644 --- a/src/beacon.cpp +++ b/src/beacon.cpp @@ -1,6 +1,10 @@ +#include +#include #include +#include int main(int argc, char *argv[]) { printf("Hello world, I am the beacon\n"); + return 0; }