mirror of https://github.com/mono/CppSharp.git
Browse Source
Many functions in libc++ are marked with _LIBCPP_INLINE_VISIBILITY. This means they are only exported when actually used. This is why exporting just the templates themselves failed to export their functions but listing the functions themselves worked. We need to define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS to have the functions always exported. We use _LIBCPP_VERSION to detect if we use libc++ i.e. Clang's standard C++ library. Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>pull/1149/head
8 changed files with 24 additions and 16 deletions
@ -1,7 +1,8 @@ |
|||||||
|
#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS |
||||||
|
|
||||||
#include <string> |
#include <string> |
||||||
|
|
||||||
|
|
||||||
template __attribute__((visibility("default"))) std::basic_string<char, std::char_traits<char>, std::allocator<char>>::basic_string(); |
template class std::char_traits<char>; |
||||||
template __attribute__((visibility("default"))) std::basic_string<char, std::char_traits<char>, std::allocator<char>>::~basic_string() noexcept; |
template class std::allocator<char>; |
||||||
template __attribute__((visibility("default"))) std::basic_string<char, std::char_traits<char>, std::allocator<char>>& std::basic_string<char, std::char_traits<char>, std::allocator<char>>::assign(const std::basic_string<char, std::char_traits<char>, std::allocator<char>>::value_type*); |
template class std::basic_string<char, std::char_traits<char>, std::allocator<char>>; |
||||||
template __attribute__((visibility("default"))) const std::basic_string<char, std::char_traits<char>, std::allocator<char>>::value_type* std::basic_string<char, std::char_traits<char>, std::allocator<char>>::c_str() const noexcept; |
|
||||||
|
@ -1,7 +1,8 @@ |
|||||||
|
#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS |
||||||
|
|
||||||
#include <string> |
#include <string> |
||||||
|
|
||||||
|
|
||||||
template __attribute__((visibility("default"))) std::basic_string<char, std::char_traits<char>, std::allocator<char>>::basic_string(); |
template class std::char_traits<char>; |
||||||
template __attribute__((visibility("default"))) std::basic_string<char, std::char_traits<char>, std::allocator<char>>::~basic_string() noexcept; |
template class std::allocator<char>; |
||||||
template __attribute__((visibility("default"))) std::basic_string<char, std::char_traits<char>, std::allocator<char>>& std::basic_string<char, std::char_traits<char>, std::allocator<char>>::assign(const std::basic_string<char, std::char_traits<char>, std::allocator<char>>::value_type*); |
template class std::basic_string<char, std::char_traits<char>, std::allocator<char>>; |
||||||
template __attribute__((visibility("default"))) const std::basic_string<char, std::char_traits<char>, std::allocator<char>>::value_type* std::basic_string<char, std::char_traits<char>, std::allocator<char>>::c_str() const noexcept; |
|
||||||
|
Loading…
Reference in new issue