Andy's Workshop Forums

General Category => stm32plus C++ library => Topic started by: maxmm on March 06, 2016, 03:37:01 am

Title: Build error. cstdlib: no such file or directory.
Post by: maxmm on March 06, 2016, 03:37:01 am
Hi.
I try to build the library, but get an error:
"stm32plus.h:147:19: fatal error: cstdlib: No such file or directory
#include <cstdlib>"

I installed gcc-arm-none-eabi and scons.
What could be the problem?

(http://cs628124.vk.me/v628124366/3d302/7wuRY6aqwq8.jpg)
Title: Re: Build error. cstdlib: no such file or directory.
Post by: Andy Brown on March 06, 2016, 10:05:33 am
Hi,

cstdlib is the very first standard header that gets included so it looks like a problem with your ARM gcc installation. What does "arm-none-eabi-g++ -v" output for you? For me it says this:


$ arm-none-eabi-g++ -v
Using built-in specs.
COLLECT_GCC=C:\bin\arm-launchpad\bin\arm-none-eabi-g++.exe
COLLECT_LTO_WRAPPER=c:/bin/arm-launchpad/bin/../lib/gcc/arm-none-eabi/4.9.3/lto-wrapper.exe
Target: arm-none-eabi
Configured with: /home/build/work/GCC-4-9-build/src/gcc/configure --build=i686-linux-gnu --host=i686-w64-mingw32 --target=arm-none-eabi --prefix=/home/build/work/GCC-4-9-build/install-mingw --libexecdir=/home/build/work/GCC-4-9-build/install-mingw/lib --infodir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/info --mandir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/man --htmldir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/html --pdfdir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-headers=yes --with-newlib --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/build/work/GCC-4-9-build/install-mingw/arm-none-eabi --with-libiconv-prefix=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-gmp=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-mpfr=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-mpc=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-isl=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-cloog=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-libelf=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278] (GNU Tools for ARM Embedded Processors)
Title: Re: Build error. cstdlib: no such file or directory.
Post by: maxmm on March 06, 2016, 10:54:26 am
Thanks for your reply, Andy.
My "arm-none-eabi-g++ -v" output:
(http://cs628124.vk.me/v628124366/3d4a8/QptkGegPcIM.jpg)