From jtv at xs4all.nl Thu Dec 1 04:52:36 2011 From: jtv at xs4all.nl (Jeroen Vermeulen) Date: Thu, 01 Dec 2011 11:52:36 +0700 Subject: [Libpqxx-general] Using libpqxx 4.0 with C++11 In-Reply-To: References: Message-ID: <4ED70814.1090202@xs4all.nl> On 2011-11-30 14:39, Linus K?llberg wrote: > Hopefully this is not a stupid question. :) I try to use libpqxx 4.0 in a project that is built with clang++ and the C++11 standard (by giving the flags -std=c++0x and -stdlib=libc++ to clang++). The library itself can be built successfully with this configuration, but when I try to build my own project - which includes the pqxx headers - a problem occurs because the TR1 headers are included instead of the C++11 standard headers. I get compilation errors, because TR1 is not an extension in the new standard library. Hello linus, Just to make sure: did you configure libpqxx and build your own application with the same compiler options? It's the configure step that figures out whether to include or just plain . From that point on, the libpqxx you build will expect that header to be in the same place, even when building your own code that includes libpqxx headers. You could, if you really had to, hack around this particular point by editing the libpqxx headers to #define or #undef PQXX_TR1_HEADERS. Defining it will make the libpqxx headers use ; undefining it will make them use . But I can't guarantee that other things won't break. Jeroen