This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/LP-CC2652RB: Example: Simple Peripheral - on change of file names to CPP a linktime error occures - symbol redeclared with incompatible type

Part Number: LP-CC2652RB

Tool/software: TI C/C++ Compiler

Hi,

I just tried out the Simple_Peripheral example project and it worked fine.

As I want to develop in C++ I now changed all the files in the project to *.cpp ending.

I had to correct some missing pointer casts but finally the compiler can compile it.

Unfortunately the linker now complains about incompatible redeclaration of a method in the example project.

Here's the error output:

   error: symbol "GATT_bm_free" redeclared with incompatible type:
   "void(gattMsg_t *, uint8)"
   in
   "C:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ble5stack/inc/gatt.h"
   at line 1486 and:
   "void(gattMsg_t *, uint8)"
   in
   "C:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ble5stack/inc/gatt.h"
   at line 1486)

I don't understand the error message here, it's in same file and same line stated and the C++ preprocessor lines regarding extern"C" are in the header so I don't know where the error really comes from.

I did the same thing before with the Simple_Central project and there it works out just fine without any error!

I would be really glad if you can help me with this, attached you can find the project source for a deeper look into it!

kind regards

Andreassimple_peripheral_firmwares-cc26x2.zip

  • Thank you for notifying us of the problem, and submitting a test case.  I can reproduce the same behavior.  I filed the entry CODEGEN-6070 in the SDOWP system to have this investigated.  You are welcome to follow it with the SDOWP link below in my signature.  At this point, I am unsure of whether it is a problem in the compiler tools.  If it isn't, the investigation should indicate what causes the error.  It may be a problem in the SimpleLink SDK code, and if so, I'll make sure an appropriate entry is filed about it.

    Thanks and regards,

    -George

  • I used project zero and I got the same error after changing to C++.
  • Ok thanks George!

    I just saw there is already a workaround posted in the filed entry. I will try it out as soon as I have time for it.

    have a nice weekend!

    Andreas