- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to compile a C++ file in the Wiced SDK ? I tried a simple application test that includes and I get a lot of errors.
I tried on macOS and Linux and the errors are the same. Any idea ?
Thank you
./tools/ARM_GNU/bin/Linux64/../../include/bits/memoryfwd.h:63:3: error: template with C linkage
template<typename>
^
./tools/ARM_GNU/bin/Linux64/../../include/bits/memoryfwd.h:66:3: error: template specialization with C linkage
template<>
^
./tools/ARM_GNU/bin/Linux64/../../include/bits/memoryfwd.h:70:3: error: template with C linkage
template<typename, typename>
^
In file included from ./tools/ARM_GNU/bin/Linux64/../../include/string:39:0,
from apps/snip/foo/foo.cpp:1:
./tools/ARM_GNU/bin/Linux64/../../include/bits/stringfwd.h:52:3: error: template with C linkage
template<class _CharT>
^
./tools/ARM_GNU/bin/Linux64/../../include/bits/stringfwd.h:55:3: error: template with C linkage
template<typename _CharT, typename _Traits = char_traits<_CharT>,
^
./tools/ARM_GNU/bin/Linux64/../../include/bits/stringfwd.h:59:3: error: template specialization with C linkage
template<> struct char_traits<char>;
^
./tools/ARM_GNU/bin/Linux64/../../include/bits/stringfwd.h:65:3: error: template specialization with C linkage
template<> struct char_traits<wchar_t>;
^
In file included from ./tools/ARM_GNU/bin/Linux64/../../include/bits/stl_algobase.h:61:0,
from ./tools/ARM_GNU/bin/Linux64/../../include/bits/char_traits.h:39,
from ./tools/ARM_GNU/bin/Linux64/../../include/string:40,
from apps/snip/foo/foo.cpp:1:
./tools/ARM_GNU/bin/Linux64/../../include/bits/cpp_type_traits.h:72:3: error: template with C linkage
template<typename _Iterator, typename _Container>
^
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try in sdk3.7.0 (looks same in 4.0) file WICED-SDK\tools\makefiles\wiced_toolchain_ARM_GNU.mk
make small change add COMPILER_SPECIFIC_SYSTEM_DIR_CXX and change CXX
ifeq ($(COMPILER_SPECIFIC_SYSTEM_DIR),)
COMPILER_SPECIFIC_SYSTEM_DIR := -isystem $(TOOLCHAIN_PATH)../../include -isystem $(TOOLCHAIN_PATH)../../lib/include -isystem $(TOOLCHAIN_PATH)../../lib/include-fixed
COMPILER_SPECIFIC_SYSTEM_DIR_CXX := $(TOOLCHAIN_PATH)../../include $(TOOLCHAIN_PATH)../../lib/include $(TOOLCHAIN_PATH)../../lib/include-fixed
endif
CC = "$(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)gcc$(EXECUTABLE_SUFFIX)" $(COMPILER_SPECIFIC_SYSTEM_DIR)
CXX = "$(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)g++$(EXECUTABLE_SUFFIX)" $(COMPILER_SPECIFIC_SYSTEM_DIR_CXX)
This change help compile C++ files for us.
Can wiced team approve this fix?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which sdk version you used?
With 3.5.2 no problems. With 3.7.0 was problem in makefile. Need do some correction.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I not interesting in wiced4, because removed support for freertos-lwip. But think, that same makefile bug, like 3.7.0 ... I am not at workplace, so what need change, i will append later.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try in sdk3.7.0 (looks same in 4.0) file WICED-SDK\tools\makefiles\wiced_toolchain_ARM_GNU.mk
make small change add COMPILER_SPECIFIC_SYSTEM_DIR_CXX and change CXX
ifeq ($(COMPILER_SPECIFIC_SYSTEM_DIR),)
COMPILER_SPECIFIC_SYSTEM_DIR := -isystem $(TOOLCHAIN_PATH)../../include -isystem $(TOOLCHAIN_PATH)../../lib/include -isystem $(TOOLCHAIN_PATH)../../lib/include-fixed
COMPILER_SPECIFIC_SYSTEM_DIR_CXX := $(TOOLCHAIN_PATH)../../include $(TOOLCHAIN_PATH)../../lib/include $(TOOLCHAIN_PATH)../../lib/include-fixed
endif
CC = "$(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)gcc$(EXECUTABLE_SUFFIX)" $(COMPILER_SPECIFIC_SYSTEM_DIR)
CXX = "$(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)g++$(EXECUTABLE_SUFFIX)" $(COMPILER_SPECIFIC_SYSTEM_DIR_CXX)
This change help compile C++ files for us.
Can wiced team approve this fix?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content