-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
Description
I can't cross-compile the header to Android. Tried NDK 13b, 14b, and 16b. Is Android missing an integral part of the library? If so, please add a disclaimer.
[osboxes:/work/build] $ /usr/arm-linux-androideabi/bin/arm-linux-androideabi-g++ -std=gnu++14 -I ../3rdparty/catch/catch/ -o hello_world hello_world.cpp
In file included from hello_world.cpp:1:0:
catch.hpp: In member function 'std::string Catch::ExceptionTranslatorRegistrar::ExceptionTranslator<T>::translate(std::vector<std::unique_ptr<const Catch::IExceptionTranslator> >::const_iterator, std::vector<std::unique_ptr<const Catch::IExceptionTranslator> >::const_iterator) const':
catch.hpp:1798:7: error: 'rethrow_exception' is not a member of 'std'
std::rethrow_exception(std::current_exception());
^
catch.hpp:1798:30: error: 'current_exception' is not a member of 'std'
std::rethrow_exception(std::current_exception());
Steps to reproduce
- Install NDK. For comfort, I started out with an image from dockcross.
- Put
catch.hpp
in a directory. - Make hello_world.cpp in same directory:
#include "catch.hpp"
TEST_CASE("test 1")
{
REQUIRE(1==1);
}
- Compile, making sure to use the right flags.
[osboxes:/work/build] 1 $ /usr/arm-linux-androideabi/bin/arm-linux-androideabi-g++ -std=gnu++11 -o hello_world hello_world.cpp
In file included from hello_world.cpp:1:0:
catch.hpp: In member function 'std::string Catch::ExceptionTranslatorRegistrar::ExceptionTranslator<T>::translate(std::vector<std::unique_ptr<const Catch::IExceptionTranslator> >::const_iterator, std::vector<std::unique_ptr<const Catch::IExceptionTranslator> >::const_iterator) const':
catch.hpp:1798:7: error: 'rethrow_exception' is not a member of 'std'
std::rethrow_exception(std::current_exception());
^
catch.hpp:1798:30: error: 'current_exception' is not a member of 'std'
std::rethrow_exception(std::current_exception());
^
Extra information
- Catch version: 2.2.0
- Operating System: Debian
- Compiler+version: arm-linux-androideabi-g++ versions 13b, 14b, and 16b.