warning: "TAG" redefined, #define TAG "BT"

Alen59
Posts: 25
Joined: Mon Mar 19, 2018 12:00 pm

warning: "TAG" redefined, #define TAG "BT"

Postby Alen59 » Tue Apr 24, 2018 4:35 pm

Hi,

after I compile my code I am getting the following error , any ideas?

/build/main\libmain.a(Bluetooth.o):(.rodata.REMOTE_SERVICE_UUID+0x0): multiple definition of `REMOTE_SERVICE_UUID'
/build/main\libmain.a(main.o):(.rodata.REMOTE_SERVICE_UUID+0x0): first defined here
/build/main\libmain.a(Bluetooth.o):(.rodata.REMOTE_NOTIFY_CHAR_UUID+0x0): multiple definition of `REMOTE_NOTIFY_CHAR_UUID'
/build/main\libmain.a(main.o):(.rodata.REMOTE_NOTIFY_CHAR_UUID+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [C:\esp32\esp-idf/make/project.mk:392: /c/esp32/esp32_bt/build/hello-world.elf] Error 1

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: warning: "TAG" redefined, #define TAG "BT"

Postby chegewara » Wed Apr 25, 2018 3:02 am

Do you have two files with those definitions?

Code: Select all

const uint8_t REMOTE_SERVICE_UUID[] = {0x00, 0x03, 0x5b, 0x03, 0x58, 0xe6, 0x07, 0xdd, 0x02, 0x1a, 0x08, 0x12, 0x3a, 0x00, 0x03, 0x00};
const uint8_t REMOTE_NOTIFY_CHAR_UUID[] = {0x00, 0x00, 0x29, 0x02, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb};
Try to remove const word.

Who is online

Users browsing this forum: Baidu [Spider], calico, pineapple678 and 134 guests