You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by "João M. S. Silva" <jo...@gmail.com> on 2019/05/09 10:25:11 UTC

Building Xerces without C++11

Hi,

I'm trying to build Xerces without C++11, so I'm using:

./configure --enable-xmlch-uint16_t --enable-mutexmgr-posix

However, I still get this error when building my program with Xerces:

"This file requires compiler and library support for the ISO C++ 2011
standard. This support must be enabled with the -std=c++11 or -std=gnu++11
compiler options."

Is there some other switch I'm missing? Is it possible to build without
C++11?

Thanks.

João M. S. Silva

Re: Building Xerces without C++11

Posted by "João M. S. Silva" <jo...@gmail.com>.
Hi,

I'm now building Xerces with:

CXXFLAGS="-std=c++98" ./configure --prefix=${HOME}/cots

When I compile my program, which uses Xerces from ${HOME}/cots, I get:

${HOME}/cots/include/xercesc/util/Janitor.hpp
        158:54 error: ISO C++ 1998 forbids the use of 'extern' on explicit
instantiations [-Werror=pedantic]
        159:54 error: ISO C++ 1998 forbids the use of 'extern' on explicit
instantiations [-Werror=pedantic]

João M. S. Silva


On Fri, May 10, 2019 at 12:19 AM Roger Leigh <rl...@codelibre.net> wrote:

> On 09/05/2019 11:25, João M. S. Silva wrote:
> > Hi,
> >
> > I'm trying to build Xerces without C++11, so I'm using:
> >
> > ./configure --enable-xmlch-uint16_t --enable-mutexmgr-posix
> >
> > However, I still get this error when building my program with Xerces:
> >
> > "This file requires compiler and library support for the ISO C++ 2011
> > standard. This support must be enabled with the -std=c++11 or
> -std=gnu++11
> > compiler options."
> >
> > Is there some other switch I'm missing? Is it possible to build without
> > C++11?
>
> This should be entirely optional.  C++11 features should only be enabled
> if your compiler has C++11 features available.
>
> The error you are seeing is likely due to one of the standard library
> headers which uses C++11.  However, without further context, it's not
> clear which header, or which Xerces source file or header included it.
>
> Please could you attach a full transcript of running configure and make
> V=1 so we can see exactly what got configured, and exactly which file
> the build failed on.
>
>
> Thanks,
> Roger
>

Re: Building Xerces without C++11

Posted by Roger Leigh <rl...@codelibre.net>.
On 09/05/2019 11:25, João M. S. Silva wrote:
> Hi,
> 
> I'm trying to build Xerces without C++11, so I'm using:
> 
> ./configure --enable-xmlch-uint16_t --enable-mutexmgr-posix
> 
> However, I still get this error when building my program with Xerces:
> 
> "This file requires compiler and library support for the ISO C++ 2011
> standard. This support must be enabled with the -std=c++11 or -std=gnu++11
> compiler options."
> 
> Is there some other switch I'm missing? Is it possible to build without
> C++11?

This should be entirely optional.  C++11 features should only be enabled 
if your compiler has C++11 features available.

The error you are seeing is likely due to one of the standard library 
headers which uses C++11.  However, without further context, it's not 
clear which header, or which Xerces source file or header included it.

Please could you attach a full transcript of running configure and make 
V=1 so we can see exactly what got configured, and exactly which file 
the build failed on.


Thanks,
Roger