ת����ע��������http://drovik.com/html/8410924155.html лл��
������Դ��
UDT��androidƽ̨��ֲ�����У�����NDK����buffer.cpp�ļ�ʱ����error: exception handling disabled, use -fexceptions to enable��
��������
������ij����DZ��������쳣�쳣�������ˣ���Ҫ��Android.mk�ļ��п�������Android.mk�ļ������ӣ� LOCAL_CPPFLAGS += -fexceptions�Ϳ����ˡ�������Application.mk�ļ�������APP_CPPFLAGS += -fexceptions
Ҳ�ǿ��Եġ�
���䣺
Android NDK r5��C++��֧�����
androidƽ̨�ṩ��һ����С����C++���п�(/system/lib/libstdc++)�Լ���֮��Ӧ��ͷ�ļ���
1��C++���쳣֧�֣�
��NDK r5�Ϳ�ʼNDK�Ĺ������Ϳ�ʼ֧����C++���쳣���ƣ�ֻ����Ϊ��ͨ���Ե�ԭ�����е�C++ԭ�ļ��������ʱ����Ĭ�ϵ���-fno-exceptions��������֧���쳣���Ƶġ�
ʹ��-fexceptions��ǿ��Կ����쳣���ơ�������ֻ��Ҫ�����ÿ��ģ���Android.mk������LOCAL_CPPFLAGS += -fexceptions�Ϳ����ˡ�
�����ǣ������Application.mk�ļ�������APP_CPPFLAGS += -fexceptions���������û��Զ�Ӧ�õ��㹤�̵�����ģ�鵱�С�
ע��:
�ѱ�������"arm-eabi-4.4.0"�������ṩ�������ݵ�NDK�Dz�֧���쳣�ġ�
2��RTTI support:
��NDK r5��ʼ��NDK������Ҳ��ʼ֧��C++ RTTI��Runtime Type Information���ˡ����ǣ�Ϊ��ͨ���Եģ����е�C++Դ�ļ���������ʱ��Ĭ���Dz�֧��RRRI�ģ�-fno-rtti������Ҫ�����Ļ�������Ҫ��Android.mk�����ӣ�LOCAL_CPPFLAGS += -frtti�����߸�����������Application.mk����APP_CPPFLAGS += -frtti��
ע��:
�ѱ�������"arm-eabi-4.4.0"�������ṩ�������ݵ�NDK�Dz�֧��RTTI�ġ�
III. Selecting the C++ Standard Library Implementation:
By default, the headers and libraries for the minimal C++ runtime system
library (/system/lib/libstdc++.so) are used when building C++ sources.
You can however select a different implementation by setting the variable
APP_STL to something else in your Application.mk, for example:
APP_STL := stlport_static
To select the static STLport implementation provided with this NDK.
Value APP_STL values are the following:
system -> Use the default minimal C++ runtime library.
stlport_static -> Use STLport built as a static library.
stlport_shared -> Use STLport built as a shared library.
WARNING: IMPORTANT CAVEAT
AT THE MOMENT, OUR STLPORT IMPLEMENTATION DOES NOT SUPPORT EXCEPTIONS
AND RTTI. PLEASE BE SURE TO NOT USE -fexceptions OR -frtti IN ALL
MODULES THAT USE IT.
WARNING: END OF IMPORTANT CAVEAT
"stlport_shared" is preferred if you have several shared libraries in your
project that use the C++ STL, because it avoids duplication of functions
and more importantly of global variables (e.g. std::cout) in each one of
them, which can have surprising results.
On the other hand, you will have to load it explicitely when starting your
application, as in the following example:
static {
System.loadLibrary("stlport_shared");
System.loadLibrary("foo");
System.loadLibrary("bar");
}
Where both "libfoo.so" and "libbar.so" depend on "libstlport_shared.so".
Note that the shared library's name if "libstlport_shared.so" to avoid
naming conflicts with certain Android system images which include a
system-level libstlport.so (which happens to not be ABI-stable and
cannot be used from NDK-generated machine code).
"stlport_static" is preferred if you have only one shared library in your
project: only the STL functions and variables you actually need will be
linked to your machine code, reducing its code size, and you won't need
to load the dynamic stlport_shared at startup.
IV. STLport-specific issues:
----------------------------
This NDK provides prebuilt static and shared libraries for STLport,
but you can force it to be rebuilt from sources by defining the following
in your environment or your Application.mk before building:
STLPORT_FORCE_REBUILD := true
STLport is licensed under a BSD-style open-source license. See
sources/cxx-stl/stlport/README for more details about the library.
V. Future Plans:
----------------
- Make STLport compatible with C++ exceptions and RTTI
- Full GNU libstdc++ support
- �������
- ���can't open file /cygdrive/e/android-nd (358�����)
- android socketͨ�� (231�����)
- Android������ScrollView��ListView�ij�ͻ������� (1320�����)
- Android����������ndk-stack���ndk�����ж�̬��.so���������� (4453�����)
- Android��������θı�RadioButton����ͼƬ�����ֵ����λ�� (4623�����)
- android��You cannot combine custom title (1099�����)
- Android ViewPager����ʵ�� (5437�����)
- 1¥ sbf123 ������ 2016-9-20 0:39:53
- hello,����С���ܹ�����ת����ƪ�������һᱸעԭ���������ӵĺ����ߡ� sbf123 http://www.51qbh.com
- 2¥ ca88���� ������ 2016-9-20 13:40:52
- �������� ���ڼ�� ca88���� http://jwc.hbust.com.cn