- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wish to make calls to rand() and memset() , both of which are in the WICED header files. I get linker errors that they're undefined. Presumably I need to add a library (or two) to my makefile for my BCM20736S.
How should the makefile be modified to link in rand() and memset() ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. memset()
Please refer to the file "hello_sensor.c (WICED-Smart-SDK\Apps\hello_sensor)".
You only need to include the header file "spar_utils.h".
2. rand()
You can include the library by adding the below codes in your application's makefile:
LIBS += [LIB PATH]
Ex. If you want to use function rand() in "hello_sensor" application, you can add below codes in "makefile.mk (WICED-Smart-SDK\Apps\hello_sensor)"
...
LIBS += ../../Tools/ARM_GNU/lib/libc.a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. memset()
Please refer to the file "hello_sensor.c (WICED-Smart-SDK\Apps\hello_sensor)".
You only need to include the header file "spar_utils.h".
2. rand()
You can include the library by adding the below codes in your application's makefile:
LIBS += [LIB PATH]
Ex. If you want to use function rand() in "hello_sensor" application, you can add below codes in "makefile.mk (WICED-Smart-SDK\Apps\hello_sensor)"
...
LIBS += ../../Tools/ARM_GNU/lib/libc.a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much, that solved my problem.