zhzChose the C++ project incorrectly when create the new project.
The correct way is:
File–>Project–>C Project–>Project name–>Cross ARM GCC–>Tools chain path–>Finsh.
But the problem is that still don know how to solve the problem if the project was composed with c and cpp code.
Solution for CPP project
download the libstdc++ from the followed link
https://packages.debian.org/jessie/all/libstdc++-arm-none-eabi-newlib/downloadinstall
sudo dpkg -i libstdc++-arm-none-eabi-newlib.deb
Solution for : undefined reference to `_exit’
/usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/lib/armv7-m/libg.a(lib_a-abort.o): In function `abort’:
/build/buildd/newlib-2.1.0/build/arm-none-eabi/armv7-m/newlib/libc/stdlib/../../../../../../newlib/libc/stdlib/abort.c:63: undefined reference to `_exit’
/usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/lib/armv7-m/libg.a(lib_a-signalr.o): In function `_kill_r’:
/build/buildd/newlib-2.1.0/build/arm-none-eabi/armv7-m/newlib/libc/reent/../../../../../../newlib/libc/reent/signalr.c:61: undefined reference to `_kill’
/usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/lib/armv7-m/libg.a(lib_a-signalr.o): In function `_getpid_r’:
/build/buildd/newlib-2.1.0/build/arm-none-eabi/armv7-m/newlib/libc/reent/../../../../../../newlib/libc/reent/signalr.c:96: undefined reference to `_getpid’
add the option to the linkder flags
-specs=nosys.specs