# C++ support

**URL:** <https://forum.amebaiot.com/t/c-support/1673>\
**Category:** SDK\
**Tags:** rtl872xd\
**Created:** [January 23, 2023, 12:18am UTC](https://forum.amebaiot.com/t/c-support/1673 "2023-01-23T00:18:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tuxford](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@Tuxford](https://forum.amebaiot.com/u/Tuxford)\
**Post date:** [January 23, 2023, 12:18am UTC](https://forum.amebaiot.com/t/c-support/1673/1 "2023-01-23T00:18:55Z")

</div>

Hi,

There is a problem. I changed main.c to main.cpp and also fixed build. It works fine but after adding line “std::string s;” I see a compiler error:

```auto
int main(void)
{
    std::string s;

```

```auto
e/c++/6.4.1/string:43,
                 from main.cpp:40:
skipped/asdk/ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/xml/toolchain/linux/asdk-6.4.1/linux/newlib/arm-none-eabi/include/ctype.h:14:4: error: expected unqualified-id before 'int'
 int _EXFUN(isalpha, (int __c));
    ^~~
skipped/asdk/ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/xml/toolchain/linux/asdk-6.4.1/linux/newlib/arm-none-eabi/include/ctype.h:14:4: error: expected ')' before 'int'

```

What is missing?

---

<div class="post-metadata">

**Author:** ![Radoslaw\_Rogowski](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/radoslaw_rogowski/32/1213_2.png) [@Radoslaw\_Rogowski](https://forum.amebaiot.com/u/Radoslaw_Rogowski)\
**Post date:** [January 25, 2023, 1:14pm UTC](https://forum.amebaiot.com/t/c-support/1673/2 "2023-01-25T13:14:41Z")

</div>

macros in the following file: component/soc/realtek/amebad/swlib/string/strproc.h  
are messing with the cpp headers.  
easiest solutions is to comment them out.
