News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

How do I configure an NDK environment

Started by omgfish, September 09, 2020, 05:37:07 PM

Previous topic - Next topic

omgfish

My Settings are as follows,
But there were a lot of mistakes

pls help me :-[
==========
Search-Compiler
$(#an_ndk.BASE)\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\5.0.300080\include
$(#an_ndk.BASE)\sources\cxx-stl\llvm-libc++\include
$(#an_ndk.BASE)\sources\cxx-stl\llvm-libc++abi\include
$(#an_ndk.BASE)\sysroot\usr\include
$(#an_ndk.BASE)\sysroot\usr\include\arm-linux-androideabi
$(#an_ndk.BASE)\sources\android\support\include

==========
Serach-Linker:
$(#an_ndk.BASE)\platforms\android-19\arch-arm\usr\lib
$(#an_ndk.BASE)\toolchains\llvm\prebuilt\windows-x86_64\lib\gcc\arm-linux-androideabi\4.9.x\armv7-a
$(#an_ndk.BASE)\sources\cxx-stl\llvm-libc++\libs\armeabi-v7a

Toolchain executables:
$(#an_ndk.BASE)\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64
Addition Paths:
$(#an_ndk.BASE)\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin


many errors
||=== Build: Release in C++_helloword_test (compiler: Android_arm_32) ===|
obj\Release\main.o:main.cpp:function main: error||undefined reference to 'std::__ndk1::cout'|
obj\Release\main.o(.ARM.exidx+0x0): error||undefined reference to '__aeabi_unwind_cpp_pr1'|
obj\Release\main.o(.ARM.exidx.text._ZNSt6__ndk1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc+0x0): error||undefined reference to '__aeabi_unwind_cpp_pr1'|
&): error||undefined reference to 'std::__ndk1::ios_base::getloc() const'|
&): error||undefined reference to 'std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const'|
&): error||undefined reference to 'std::__ndk1::locale::~locale()'|
&): error||undefined reference to 'std::__ndk1::locale::~locale()'|
&): error||undefined reference to '__cxa_end_cleanup'|
&): error||undefined reference to 'std::__ndk1::ctype<char>::id'|
obj\Release\main.o(.ARM.extab.text._ZNSt6__ndk14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_+0x0): error||undefined reference to '__gxx_personality_v0'|
unsigned int): error||undefined reference to 'std::__ndk1::ios_base::getloc() const'|
unsigned int): error||undefined reference to 'std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const'|
unsigned int): error||undefined reference to 'std::__ndk1::locale::~locale()'|
unsigned int): error||undefined reference to 'std::__ndk1::locale::~locale()'|
unsigned int): error||undefined reference to 'std::__ndk1::ios_base::clear(unsigned int)'|
unsigned int): error||undefined reference to '__cxa_end_catch'|
unsigned int): error||undefined reference to '__cxa_end_cleanup'|
unsigned int): error||undefined reference to '__cxa_begin_catch'|
unsigned int): error||undefined reference to 'std::__ndk1::ios_base::__set_badbit_and_consider_rethrow()'|
unsigned int): error||undefined reference to '__cxa_end_catch'|
unsigned int): error||undefined reference to 'std::__ndk1::ctype<char>::id'|
obj\Release\main.o(.ARM.extab.text._ZNSt6__ndk124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_j+0x0): error||undefined reference to '__gxx_personality_v0'|
::put(char): error||undefined reference to 'std::__ndk1::ios_base::clear(unsigned int)'|
::put(char): error||undefined reference to '__cxa_end_catch'|
::put(char): error||undefined reference to '__cxa_end_cleanup'|
::put(char): error||undefined reference to '__cxa_begin_catch'|
::put(char): error||undefined reference to 'std::__ndk1::ios_base::__set_badbit_and_consider_rethrow()'|
::put(char): error||undefined reference to '__cxa_end_catch'|
obj\Release\main.o(.ARM.extab.text._ZNSt6__ndk113basic_ostreamIcNS_11char_traitsIcEEE3putEc+0x0): error||undefined reference to '__gxx_personality_v0'|
::flush(): error||undefined reference to 'std::__ndk1::ios_base::clear(unsigned int)'|
::flush(): error||undefined reference to '__cxa_end_cleanup'|
::flush(): error||undefined reference to '__cxa_begin_catch'|
::flush(): error||undefined reference to 'std::__ndk1::ios_base::__set_badbit_and_consider_rethrow()'|
obj\Release\main.o(.ARM.extab.text._ZNSt6__ndk113basic_ostreamIcNS_11char_traitsIcEEE5flushEv+0x0): error||undefined reference to '__gxx_personality_v0'|
::__throw_length_error() const: error||undefined reference to '__cxa_allocate_exception'|
::__throw_length_error() const: error||undefined reference to 'std::logic_error::logic_error(char const*)'|
::__throw_length_error() const: error||undefined reference to '__cxa_throw'|
::__throw_length_error() const: error||undefined reference to '__cxa_free_exception'|
::__throw_length_error() const: error||undefined reference to 'vtable for std::length_error'|
::__throw_length_error() const: error||undefined reference to 'typeinfo for std::length_error'|
::__throw_length_error() const: error||undefined reference to 'std::length_error::~length_error()'|
obj\Release\main.o(.ARM.exidx.text._ZNSt6__ndk113basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_+0x0): error||undefined reference to '__aeabi_unwind_cpp_pr1'|
::sentry::~sentry(): error||undefined reference to 'std::uncaught_exception()'|
::sentry::~sentry(): error||undefined reference to 'std::__ndk1::ios_base::clear(unsigned int)'|
::sentry::~sentry(): error||undefined reference to '__cxa_begin_catch'|
char): error||undefined reference to '__cxa_allocate_exception'|
char): error||undefined reference to 'std::logic_error::logic_error(char const*)'|
char): error||undefined reference to '__cxa_throw'|
char): error||undefined reference to '__cxa_free_exception'|
char): error||undefined reference to 'vtable for std::length_error'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 4 second(s)) ===|

Miguel Gimenez


omgfish


omgfish

 :'( :'( :'( :'( :'( :'(
||=== Build: Release in C++_helloword_test (compiler: Android_arm_32) ===|
obj\Release\main.o:main.cpp:function main: error||undefined reference to 'std::__ndk1::cout'|
obj\Release\main.o(.ARM.exidx+0x0): error||undefined reference to '__aeabi_unwind_cpp_pr1'|
obj\Release\main.o(.ARM.exidx.text._ZNSt6__ndk1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc+0x0): error||undefined reference to '__aeabi_unwind_cpp_pr1'|
&): error||undefined reference to 'std::__ndk1::ios_base::getloc() const'|
&): error||undefined reference to 'std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const'|
&): error||undefined reference to 'std::__ndk1::locale::~locale()'|
&): error||undefined reference to 'std::__ndk1::locale::~locale()'|
&): error||undefined reference to '__cxa_end_cleanup'|
&): error||undefined reference to 'std::__ndk1::ctype<char>::id'|
obj\Release\main.o(.ARM.extab.text._ZNSt6__ndk14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_+0x0): error||undefined reference to '__gxx_personality_v0'|
unsigned int): error||undefined reference to 'std::__ndk1::ios_base::getloc() const'|
unsigned int): error||undefined reference to 'std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const'|
unsigned int): error||undefined reference to 'std::__ndk1::locale::~locale()'|
unsigned int): error||undefined reference to 'std::__ndk1::locale::~locale()'|
unsigned int): error||undefined reference to 'std::__ndk1::ios_base::clear(unsigned int)'|
unsigned int): error||undefined reference to '__cxa_end_catch'|
unsigned int): error||undefined reference to '__cxa_end_cleanup'|
unsigned int): error||undefined reference to '__cxa_begin_catch'|
unsigned int): error||undefined reference to 'std::__ndk1::ios_base::__set_badbit_and_consider_rethrow()'|
unsigned int): error||undefined reference to '__cxa_end_catch'|
unsigned int): error||undefined reference to 'std::__ndk1::ctype<char>::id'|
obj\Release\main.o(.ARM.extab.text._ZNSt6__ndk124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_j+0x0): error||undefined reference to '__gxx_personality_v0'|
::put(char): error||undefined reference to 'std::__ndk1::ios_base::clear(unsigned int)'|
::put(char): error||undefined reference to '__cxa_end_catch'|
::put(char): error||undefined reference to '__cxa_end_cleanup'|
::put(char): error||undefined reference to '__cxa_begin_catch'|
::put(char): error||undefined reference to 'std::__ndk1::ios_base::__set_badbit_and_consider_rethrow()'|
::put(char): error||undefined reference to '__cxa_end_catch'|
obj\Release\main.o(.ARM.extab.text._ZNSt6__ndk113basic_ostreamIcNS_11char_traitsIcEEE3putEc+0x0): error||undefined reference to '__gxx_personality_v0'|
::flush(): error||undefined reference to 'std::__ndk1::ios_base::clear(unsigned int)'|
::flush(): error||undefined reference to '__cxa_end_cleanup'|
::flush(): error||undefined reference to '__cxa_begin_catch'|
::flush(): error||undefined reference to 'std::__ndk1::ios_base::__set_badbit_and_consider_rethrow()'|
obj\Release\main.o(.ARM.extab.text._ZNSt6__ndk113basic_ostreamIcNS_11char_traitsIcEEE5flushEv+0x0): error||undefined reference to '__gxx_personality_v0'|
::__throw_length_error() const: error||undefined reference to '__cxa_allocate_exception'|
::__throw_length_error() const: error||undefined reference to 'std::logic_error::logic_error(char const*)'|
::__throw_length_error() const: error||undefined reference to '__cxa_throw'|
::__throw_length_error() const: error||undefined reference to '__cxa_free_exception'|
::__throw_length_error() const: error||undefined reference to 'vtable for std::length_error'|
::__throw_length_error() const: error||undefined reference to 'typeinfo for std::length_error'|
::__throw_length_error() const: error||undefined reference to 'std::length_error::~length_error()'|
obj\Release\main.o(.ARM.exidx.text._ZNSt6__ndk113basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_+0x0): error||undefined reference to '__aeabi_unwind_cpp_pr1'|
::sentry::~sentry(): error||undefined reference to 'std::uncaught_exception()'|
::sentry::~sentry(): error||undefined reference to 'std::__ndk1::ios_base::clear(unsigned int)'|
::sentry::~sentry(): error||undefined reference to '__cxa_begin_catch'|
char): error||undefined reference to '__cxa_allocate_exception'|
char): error||undefined reference to 'std::logic_error::logic_error(char const*)'|
char): error||undefined reference to '__cxa_throw'|
char): error||undefined reference to '__cxa_free_exception'|
char): error||undefined reference to 'vtable for std::length_error'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 4 second(s)) ===|

omgfish

Can anyone post the correct configuration

omgfish

main.cpp

#include <iostream>

//using namespace std;

int main()
{
    std::cout << "Hello world!" << std::endl;
    return 0;
}

Miguel Gimenez

Did you read the link I posted?. You must attach a full rebuild log in code tags, and you failed to do both parts.

The text in code tags should look like this

omgfish


Miguel Gimenez


omgfish