dimanche 26 juin 2016

Autoconf rejected by C++11 library accepted by compiler, reject by preprocessor

I'm trying to integrate rapidcheck into an existing C++ codebase. The README says it requires C++11 and relys heavily on its features. The codebase I am integrating it into uses automake to build all of the dependencies. Here is how I am adding the dependency inside of configure.ac

  CXXFLAGS="$CXXFLAGS -Wall -Werror -Wno-missing-braces -std=c++11"
  CXXFLAGS="$CXXFLAGS -I/home/chris/dev/rapidcheck/include"
  CXXFLAGS="$CXXFLAGS -I/home/chris/dev/rapidcheck/include/rapidcheck"
  AC_CHECK_HEADERS(
      [rapidcheck.h],
      [AC_CHECK_LIB([rapidcheck], [main],[], [])],
      [])

Here is the error I am getting when run the config file

checking rapidcheck.h usability... yes
checking rapidcheck.h presence... no
configure: WARNING: rapidcheck.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: rapidcheck.h: proceeding with the compiler's result

I think it has something to do with not having an up to date C++ compiler. Here is the version of C++ I have installed.

chris@chris:~/dev/bitcoin$ g++ --version
g++ (Ubuntu 4.9.3-8ubuntu2~14.04) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Which I THINK is C++11 compatible.

Aucun commentaire:

Enregistrer un commentaire