Author Topic: How do I configure an NDK environment  (Read 4095 times)

Offline omgfish

  • Multiple posting newcomer
  • *
  • Posts: 13
How do I configure an NDK environment
« on: September 09, 2020, 05:37:07 pm »
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)) ===|
« Last Edit: September 09, 2020, 06:45:38 pm by omgfish »

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: How do I configure an NDK environment
« Reply #1 on: September 09, 2020, 06:08:37 pm »
We can't help without knowing the "lot of mistakes", please post a full rebuild log

http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

BTW, you can write just $(#an_ndk)

Offline omgfish

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: How do I configure an NDK environment
« Reply #2 on: September 09, 2020, 06:43:06 pm »
mani errors

Offline omgfish

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: How do I configure an NDK environment
« Reply #3 on: September 09, 2020, 06:44:36 pm »
 :'( :'( :'( :'( :'( :'(
||=== 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)) ===|

Offline omgfish

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: How do I configure an NDK environment
« Reply #4 on: September 09, 2020, 06:47:48 pm »
Can anyone post the correct configuration

Offline omgfish

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: How do I configure an NDK environment
« Reply #5 on: September 09, 2020, 06:48:32 pm »
main.cpp

#include <iostream>

//using namespace std;

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

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: How do I configure an NDK environment
« Reply #6 on: September 09, 2020, 07:02:31 pm »
Did you read the link I posted?. You must attach a full rebuild log in code tags, and you failed to do both parts.

Code
The text in code tags should look like this

Offline omgfish

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: How do I configure an NDK environment
« Reply #7 on: September 10, 2020, 02:33:04 am »
do you configed the NDK environment??

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: How do I configure an NDK environment
« Reply #8 on: September 10, 2020, 11:33:24 am »
No

Offline omgfish

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: How do I configure an NDK environment
« Reply #9 on: September 21, 2020, 06:50:49 pm »
i have solved this