摘要: 由于上次没有正常关闭eclipse,再启动时,卡死在loding workbench,以下方法摘自http://stackoverflow.com/questions/8972034/eclipse-hangs-on-loading-workbench, 阅读全文
posted @ 2013-06-03 09:20 酷熊 阅读(240) 评论(0) 推荐(0) 编辑
摘要: MYSRC_ROOT := $(LOCAL_PATH)/../../ClassesFILE_LIST := $(wildcard $(MYSRC_ROOT)/Actions/*.cpp)FILE_LIST += $(wildcard $(MYSRC_ROOT)/Constants/*.cpp)FILE_LIST += $(wildcard $(MYSRC_ROOT)/Helpers/*.cpp)FILE_LIST += $(wildcard $(MYSRC_ROOT)/*.cpp)LOCAL_SRC_FILES := helloworld/main.cppLOCAL_SRC_FILES += 阅读全文
posted @ 2013-05-30 17:38 酷熊 阅读(2848) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<tchar.h>#include<windows.h>#include"ConvertUTF.h"int_tmain(intargc,_TCHAR*argv[]){ConversionResultresult=sourceIllegal;UTF16utf16_buf[8] = {0};utf16_buf[0] = 0xd834;utf16_buf[1] = 0xdf00;utf16_buf[2] = 0xd834;utf16_buf[3] = 0xdf01;utf16_buf[4] = 阅读全文
posted @ 2013-05-27 18:28 酷熊 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 去工程的AndroidManifest.xml,添加或者在Eclipse中打开AndroidManifest.xml,选中"Permissions选项卡",Add...,选择"Uses Permission",在右侧的Name下拉列表中选择即可 阅读全文
posted @ 2013-05-27 18:23 酷熊 阅读(817) 评论(0) 推荐(0) 编辑
摘要: using namespace std;1、字符串中不含有汉字|--string-->wstringstring s("abc");wstring ws(s.begin(), s.end());//或者wstring ws; ws.assign(s.begin(), s.end());|--wstring-->stringwstring ws(L"ABC");string s(ws.begin(), ws.end());//或者string s; s.assign(ws.begin(), ws.end());2、字符串中含有汉字|--Wind 阅读全文
posted @ 2013-05-24 13:28 酷熊 阅读(1051) 评论(0) 推荐(0) 编辑
摘要: 摘自:stackoverflowstring? wstring?std::string is a basic_string templated on a char, and std::wstring on a wchar_t.char vs. wchar_tchar is supposed to hold a character, usually a 1-byte character. wchar_t is supposed to hold a wide character, and then, things get tricky: On Linux, a wchar_t is 4-bytes 阅读全文
posted @ 2013-05-24 11:03 酷熊 阅读(862) 评论(0) 推荐(0) 编辑
摘要: Android版本的OSG不支持3ds插件(可以查看osg\src\osgPlugins\CmakeLists.txt文件,搜素’android’关键词,可以搜索到’IF(NOTANDROID)ADD_SUBDIRECTORY(3ds)ENDIF()’,可见,android下3ds被屏蔽了),也就是使用Android-ndk编译OSG的时候,不能编译osgdb_3ds.a插件,那么接下来展示一下手动编译osgdb_3ds.a的过程,假设OSG其他库已经编译完成,库文件位于c:/cygwin/usr/local/include,头文件位于c:/cygwin/usr/local/obj/local 阅读全文
posted @ 2013-05-23 10:15 酷熊 阅读(628) 评论(0) 推荐(0) 编辑
摘要: 摘自:Notes的百度空间默认所有代码和文件在$project/jni下,否则特殊说明。情况一:编译静态库文件Android.mk:LOCAL_PATH:=$(callmy-dir)include$(CLEAR_VARS)LOCAL_MODULE:=hello-jniLOCAL_SRC_FILES:=hello-jni.cinclude$(BUILD_STATIC_LIBRARY)文件Application.mk:APP_MODULES:=hello-jni情况二:编译动态库文件Android.mk:LOCAL_PATH:=$(callmy-dir)include$(CLEAR_VARS)LO 阅读全文
posted @ 2013-05-22 16:06 酷熊 阅读(1045) 评论(0) 推荐(0) 编辑
摘要: 参考:四维空间hanyezhiyu8的博客。使用ADT-Eclipse新建一个Android Application Project,功成名TestA,右击TestA,Android Tools-Add Native Support...,完成后工程中会增加一个jni文件夹,里面有TestA.cpp和Android.mk两个文件,其中TestA.cpp中只有#include <jni.h>一句话。--------------------------------------------------------在MainActivity.java中添加一个native函数public 阅读全文
posted @ 2013-05-22 11:48 酷熊 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 1、字符串转double、floatdouble osg::asciiToFloat(const char* str);位于\src\osg\Math.hdouble osg::asciiToDouble(const char* str);位于\src\osg\Math.cpp2、快速生成Geometry、GeodeGeode* osg::createGeodeForImage(osg::Image* image);位于\src\osg\image.cppGeometry* osg::createTexturedQuadGeometry(const Vec3&corner, const 阅读全文
posted @ 2013-05-20 14:53 酷熊 阅读(7228) 评论(0) 推荐(1) 编辑