# FAQ: Installation Questions¶

This section provides answers and solutions to common installation-related questions and problems.

A: TODO

$./configure --with-stdlib=libc++ # sets CXXFLAGS and LDFLAGS  ## Q: How do I fix error: A compiler with support for C++11 language features is required.?¶ A: This error means that your autodetected C++ compiler does not support the C++11 standard; most likely, the ./configure found an older version of GCC, such as GCC 4.2 on Mac OS X systems. If you have a newer compiler available on your system, set the CC and CXX environment variables accordingly. For example, to use Clang, you would configure the libcpr build as follows: $ CC=clang CXX=clang++ ./configure


If you don’t have a C++11 compiler, you will need to obtain one to build libcpr. Please refer to the Installation chapter for directions.

## Q: How do I fix fatal error: 'system_error' file not found?¶

A: This error means that your C++ compiler is using a pre-C++11 standard library, most likely an old version of the libstdc++ standard library that ships with GCC.

The problem here is that for reasons of backwards compatibility, Clang (the C/C++ compiler on Mac OS X) by default always uses the GCC 4.2-era libstdc++ standard library implementation, which predates the C++11 standard and does not support most C++11 features. This is the case regardless of whether you specify the -std=c++11 flag when compiling.

If you’re on Mac OS X 10.8 (Mountain Lion) or 10.7 (Lion), the fix is simple: just make sure that the CXXFLAGS and LDFLAGS environment variables also include the flag -stdlib=libc++. This will make Clang use the C++11-conformant libc++ standard library implementation instead of the ancient libstdc++ still shipped by Apple. The best way to ensure this is to configure the libcpr build as follows:

\$ ./configure --with-stdlib=libc++   # sets CXXFLAGS and LDFLAGS