- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I added MyCode.cpp to this path 43xxx_Wi-Fi\apps\snip\scan.
Contents of MyCode.cpp is as follows.
/************start of MyCode.cpp************/
#include "wiced.h"
/************End of MyCode.cpp************/
Contents of scan.mk is as follows.
NAME := App_Scan
$(NAME)_SOURCES := scan.c
$(NAME)_SOURCES += MyCode.cpp
While compiling following error is coming.
Why this error ?
As per my understanding compilation should happen successfully.
Solved! Go to Solution.
- Labels:
-
Wi-Fi Direct
-
WICED Studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I successfully use wiced in a c++11 project. However, out of the box I ran into compilation issues as well.
One header file has an unbalanced extern "C" block. Try to fix that first and compile again.
WICED/security/BESL/host/WICED/tls_types.h
I also had to make some changes to the file
tools/makefiles/wiced_toolchain_ARM_GNU.mk
among others added a -std=c++11 -Wno-literal-suffix
COMPILER_SPECIFIC_STANDARD_CXXFLAGS = -Wall -fsigned-char -ffunction-sections -fdata-sections -fno-common -fno-rtti -fno-exceptions -fdiagnostics-color -std=c++11 -Wno-literal-suffix $(if $(filter yes,$(CYPRESS_INTERNAL) $(TESTER)),-Werror)
Please see the attached files
- 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
Hi,
I successfully use wiced in a c++11 project. However, out of the box I ran into compilation issues as well.
One header file has an unbalanced extern "C" block. Try to fix that first and compile again.
WICED/security/BESL/host/WICED/tls_types.h
I also had to make some changes to the file
tools/makefiles/wiced_toolchain_ARM_GNU.mk
among others added a -std=c++11 -Wno-literal-suffix
COMPILER_SPECIFIC_STANDARD_CXXFLAGS = -Wall -fsigned-char -ffunction-sections -fdata-sections -fno-common -fno-rtti -fno-exceptions -fdiagnostics-color -std=c++11 -Wno-literal-suffix $(if $(filter yes,$(CYPRESS_INTERNAL) $(TESTER)),-Werror)
Please see the attached files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot for your valued suggestions. One more thing I wanted to add which might look obvious: If you are trying to run
int run_test(int argc, char **argv) for a .cpp file, replace the same thing with extern "C" int run_test(int argc, char **argv) for successfully compiling a .cpp code.