Simplicity Studio running an mbed example - 'undefined reference to __wrap_exit'
03/74/2018 | 11:30 PM
If a project imported from mbed compiler into Simplicity Studio has a build error - 'undefined reference to __wrap_exit', the following steps need to be followed to fix the error -
1. Right click on the project in Studio
2. Navigate to Properties
3. Under C/C++ Build, go to Settings
4. Under GNU ARM C++ Linker, select Miscellaneous
5. In Linker flags, remove -Wl, --wrap, exit (It is easier to copy the entire list onto Notepad++ and then remove the text)
6. Make sure you leave the other flags as is (there is another flag called -Wl, --wrap, atexit - you don't have to delete this)
7. Build the project
Simplicity Studio running an mbed example - 'undefined reference to __wrap_exit'
If a project imported from mbed compiler into Simplicity Studio has a build error - 'undefined reference to __wrap_exit', the following steps need to be followed to fix the error -
1. Right click on the project in Studio
2. Navigate to Properties
3. Under C/C++ Build, go to Settings
4. Under GNU ARM C++ Linker, select Miscellaneous
5. In Linker flags, remove -Wl, --wrap, exit (It is easier to copy the entire list onto Notepad++ and then remove the text)
6. Make sure you leave the other flags as is (there is another flag called -Wl, --wrap, atexit - you don't have to delete this)
7. Build the project
This error is because of a workflow bug in the mbed compiler's online tooling and they are working on fixing this - https://os.mbed.com/questions/77938/mbed_blinky-fails-to-build-on-gcc-undefi/