Short Question
When I set C++ Standard Library
as libc++
on Xcode, how can I use string
of libstdc++
?
Background
I'm in trouble with using two 3rd-party libraries. Library A is based on libc++
and Library B is based on libstdc++
. So, I set C++ Standard Library
as libc++
and imported libstdc++.6.tbd
Compilation goes okay, however, here is the problem.
const std::string param1 = [nsstring1 UTF8String];
LibraryBFunction(3, param1);
When LibraryBFunction
is called, an error occurred.
error: no matching function for call to 'LibraryBFunction'
candidate function not viable: no known conversion from 'const string' (aka 'const std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >') to 'const string' (aka 'const std::basic_string<char, std::char_traits<char>, std::allocator<char> >') for 2nd argument
I think Xcode compiler changes std
namespace in code to std::__1
which belongs to libc++
. So, I want to use std::string
of libstdc++
, but I don't know how to do that.