tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 'to_string' is not a member of 'std'



On 10/10/17 07:42, Edgar Fuß wrote:
I'm trying to buld 2017Q3 (which I consider supported) on NetBSD-6.1 (which I
consider supported). However, building secutity/gpgme fails with
	error: 'to_string' is not a member of 'std'

Changing it's USE_LANGUAGES from c++ to c++11 makes the configure phase fail
because it tries to run /lib/cpp.

So I built lang/gcc48. However, compiling a simple
	#include <string>

	int main()
	{
		std::to_string(0);
		return 0;
	}
with /usr/pkg/gcc48/bin/cc -std=c++11 gives the same error. Same with
lang/gcc49 and lang/gcc5.
On a NetBSD-7 machine (which also has gcc 4.8.5), it works!

I must be doing something stupidly wrong, no?

I've hit this a few times in FreeBSD ports.  For what it's worth, this is the workaround I used:

CXXFLAGS+=    -D_GLIBCXX_USE_C99 -D_GLIBCXX_USE_C99_MATH -D_GLIBCXX_USE_C99_MATH_TR1

Ref:

http://stackoverflow.com/questions/26832199/getting-gcc-in-c11-mode-to-work-on-freebsd

It might at least help you understand the problem...

--
Earth is a beta site.


Home | Main Index | Thread Index | Old Index