libemf2svg icon indicating copy to clipboard operation
libemf2svg copied to clipboard

Build error on MSYS2: 'atoi' is not a member of 'std'

Open myd7349 opened this issue 9 years ago • 3 comments

It seems that the using directive at the beginning of src/conv/emf2svg.cpp causes this error.

using namespace std;

myd7349 avatar Jun 26 '16 08:06 myd7349

Could you give more information about the environment in which you want to use libemf2svg?

Like the OS, the compiler used, which version of libc?

kakwa avatar Jun 27 '16 21:06 kakwa

@kakwa My environment: MSYS2

$ gcc -v Using builtin specs。 COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-msys/4.9.2/lto-wrapper.exe Target:i686-pc-msys Configuration:/msys_scripts/gcc/src/gcc-4.9.2/configure --build=i686-pc-msys --prefix=/usr --libexecdir=/usr/lib --enable-bootstrap --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --with-arch=i686 --disable-multilib --disable-sjlj-exceptions --with-tune=generic --enable-__cxa_atexit --with-dwarf2 --enable-languages=c,c++,fortran,lto --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --disable-win32-registry --disable-symvers --with-gnu-ld --with-gnu-as --disable-isl-version-check --enable-checking=release --without-libiconv-prefix --without-libintl-prefix --with-system-zlib Thread:posix gcc version 4.9.2 (GCC)

myd7349 avatar Jun 28 '16 13:06 myd7349

atoi is in stdlib.h, does adding

#include <cstdlib>

at line 26 fix it ?

simevo avatar Jun 27 '19 11:06 simevo