by Forrest Sheng Bao http://fsbao.net
An updated version for Ubuntu 9.10 is here: lparse 1.1.1 compiling conflicts with GCC 4.4.1 on Ubuntu Linux 9.10
If you are having problem compiling lparse 1.1.1 using GCC 4.3.3, specifically on Ubuntu 9.04, and your error happens to be like this
Open src/extern.h and comment the line
This is my GCC version info:
An updated version for Ubuntu 9.10 is here: lparse 1.1.1 compiling conflicts with GCC 4.4.1 on Ubuntu Linux 9.10
If you are having problem compiling lparse 1.1.1 using GCC 4.3.3, specifically on Ubuntu 9.04, and your error happens to be like this
g++ -g -O3 -c instance.cc In file included from instance.cc:23: extern.h:86: error: previous declaration of ‘long int strtol(const char*, char**, int)’ with ‘C++’ linkage /usr/include/stdlib.h:186: error: conflicts with new declaration with ‘C’ linkage /usr/include/stdlib.h:186: error: declaration of ‘long int strtol(const char*, char**, int) throw ()’ throws different exceptions extern.h:86: error: from previous declaration ‘long int strtol(const char*, char**, int)’just do a simple step:
Open src/extern.h and comment the line
long int strtol(const char *nptr, char **endptr, int base);which is around line 86.
strtol is a C++ standard library function used to convert numbers of different radixes (or bases). So it doesn't need to be redefined here. This is my GCC version info:
$ gcc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)