热门标签 | HotTags
当前位置:  开发笔记 > 前端 > 正文

代码从windows下visualstudio到andriod平台迁移实现步骤

这篇文章主要介绍了代码从windows下visualstudio到andriod平台迁移的修改记录的相关资料,需要的朋友可以参考下

代码从windows下visual studio到andriod平台迁移实现步骤:

前言

前言也是迁言,从windows的visual studio 2012平台迁移到Android平台上,需用修改挺多的代码和需用注意地方。

我们当然的平台当初就考虑了其他平台跨平台的应用问题,所以一开始在windows下就是用cmake来完成工程的建立的,cMakeLists.txt文件都做了一些处理,但是此时只是更针对或说首先保证windows下的编译和使用。

谨此做个记录。

1. modify cMakeLists.txt file,add android define and macro.

2.cmake ./../
	Build files have been written to: /home/andriod_a/build

3.size_t problem add  head file.

4.error: extra qualification 'rw::scoped_lock::' on member 'scoped_lock' [-fpermissive]  
 remove the class identifier.
 
5. memcpy define in  .so change it.

6.no match for 'operator=' in 'inverse = rw_math::matrix3f::operator*(float) const((1.0e+0f / det))'

//inverse = inverse * (1.0f/det);
	matrix3f temp = inverse * (1.0f/det);
	inverse = temp;
	
7.no match for 'operator=' in 'rot_mat = rw_math::matrix4f::make_rotation_matrix(
 matrix4f matrix4f_tmp = make_rotation_matrix(axis_,angle_in_rad_);
  rot_mat = matrix4f_tmp;

8.warning: inline function 'double const& rw_math::vector3d::operator[](int) const' used but never defined [enabled by default]
		
9.error: 'memcmp' was not declared in this scope
 #include 
 
10.initializing argument 2 of 'char* strncat(char*, char const*, size_t)' [-fpermissive]

11.compile jpeg library. 
	copy source code,then write or change cMakeLists.txt,then create a buid file,open terminal in the new build file.
	cmake ./../ ,the last is make ,and it will show u.
12.multiple definition of 'std::__lg(int)
	i define the inline,so error.
	
13. the inline function which must achieve in head file ,and could not in *.cpp file. or,u can delete inline word in head files.
	
14. conflicts with previous declaration 'typedef class rw::rw_shared_ptr rw_json::json_value_iterator::ptr'

	 multidefine .
15.no matching function for call to 'transform()
	transform(ext_.begin(), ext_.end(), ext_.begin(), ::tolower);
	
16. temp varity can't assign to non-const reference.
	rw_shared_ptr_shadow temp_shadow = entity_.to_shared_ptr_shadow();
	pt2model_entity_define::ptr temp_ptr = temp_shadow.to_shared_ptr();
	build_pt2model_entity(_pGeometry,_pSymbol,temp_ptr);
17.	fatal error: json\json.h: No such file or director
		#include  ----->#include 
18.	fatal error: zlib\\zconf.h: No such file or directory
	----->#include "zlib/zlib.h"
19. error: cannot pass objects of non-trivially-copyable type 'const mapped_type {aka const struct std::basic_string}' through '.
	--->(content_type_field).c_str();
20.537:49: error: invalid initialization of non-const reference of type 'std::string& {aka std::basic_string&}' from an rvalue of type 'std::string {aka std::basic_string}'
	string temp_str = request_.get()->get_url();
		string& tmp_req_url = temp_str;	
21. error: no matching function for call 
	temp variaty problem. make a temp variaty.
	matrix4d temp_mat = world_mat * t_mat;
	render_system_->set_world_matrix(temp_mat);
22.	abs()--->fabs();

23.rw_terrian_manager.h:69:12: error: 'terrian_tile' was not declared in this scope
	can not recongize the friend class in GCC ,so chang forward declaration.
	#ifdef __linux__
	class terrian_tile;
	#endif
24. Windows.h: No such file or directory
		linux not compile this model,and commit it.
25.	itoa---->

	#include 
	std::ostringstream oss;
	std::string str = "";
	oss <<_counter;
	str = oss.str();
26.	error: taking address of temporary 
	box3d bbox = (instances_[i]->get_bounding());
	if (!manipulate_geo_hash(instances_[i]->get_id(), &bbox, update_geo_hash))
	ta
27.	error: no matching function for call to 'transform(std::basic_string::iterator, std::basic_string::iterator, std::basic_string::iterator, )'
    transform(_texture_type.begin(), _texture_type.end(), _texture_type.begin(), ::tolower);
		
28.	GetModuleFileName((HINSTANCE)&__ImageBase,buffer,256);
		#include 
		------->string buffer = getcwd(NULL, 0);
		string execution_path= buffer;
29. xstring ---->

30.invalid cast of an rvalue expression of type 'rw::multi_point::ptr {aka rw::rw_shared_ptr}' to type 'rw::multi_point*&'
		temp variable error.
31.	error: 'atof' was not declared in this scope
			std::stringstream oss;
			int temp_int;
			oss <<_pri_string;
			oss >> temp_int;
			_var = temp_int;
32.error: conflicts with previous declaration
	u known, have more than one define in u's file.so,find and delete it.
33.	malloc no declear.
	#include 
	
34. 	image_info_->image_type = image_type_;
	 rw_image :image_type("ccccccccccccccccc"),
	 
35. don't write like this.
			_runtime->register_service(_aaaa_multi_service_pid, get_aaa_multi_service());
			((_driver_multi_service_impl*)get_aaa_multi_service())->init(_runtime);	 
			((_driver_multi_service_impl*)get_aaa_multi_service())->set_runtime(_runtime);	 
36.	 register_service at last place when add_multi_service.
		((terrian_data_sqlite_service_impl*)tms)->init();
		_runtime->register_service(terrian_data_sqlite_service_pid, tms );
		
37.	dom does not show,because android system does not support multi-therad rendering.
	so ,put the upload in draw thread.

38.please set RW_INDEX rw_uint16 in rw_render_object_creator.cpp when u compile the code in android system,otherwise leave it alone.	

	
	
	
	
		

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!


推荐阅读
  • 本文介绍了在开发Android新闻App时,搭建本地服务器的步骤。通过使用XAMPP软件,可以一键式搭建起开发环境,包括Apache、MySQL、PHP、PERL。在本地服务器上新建数据库和表,并设置相应的属性。最后,给出了创建new表的SQL语句。这个教程适合初学者参考。 ... [详细]
  • 在说Hibernate映射前,我们先来了解下对象关系映射ORM。ORM的实现思想就是将关系数据库中表的数据映射成对象,以对象的形式展现。这样开发人员就可以把对数据库的操作转化为对 ... [详细]
  • 本文详细介绍了Linux中进程控制块PCBtask_struct结构体的结构和作用,包括进程状态、进程号、待处理信号、进程地址空间、调度标志、锁深度、基本时间片、调度策略以及内存管理信息等方面的内容。阅读本文可以更加深入地了解Linux进程管理的原理和机制。 ... [详细]
  • 高质量SQL书写的30条建议
    本文提供了30条关于优化SQL的建议,包括避免使用select *,使用具体字段,以及使用limit 1等。这些建议是基于实际开发经验总结出来的,旨在帮助读者优化SQL查询。 ... [详细]
  • Skywalking系列博客1安装单机版 Skywalking的快速安装方法
    本文介绍了如何快速安装单机版的Skywalking,包括下载、环境需求和端口检查等步骤。同时提供了百度盘下载地址和查询端口是否被占用的命令。 ... [详细]
  • YOLOv7基于自己的数据集从零构建模型完整训练、推理计算超详细教程
    本文介绍了关于人工智能、神经网络和深度学习的知识点,并提供了YOLOv7基于自己的数据集从零构建模型完整训练、推理计算的详细教程。文章还提到了郑州最低生活保障的话题。对于从事目标检测任务的人来说,YOLO是一个熟悉的模型。文章还提到了yolov4和yolov6的相关内容,以及选择模型的优化思路。 ... [详细]
  • 本文介绍了在SpringBoot中集成thymeleaf前端模版的配置步骤,包括在application.properties配置文件中添加thymeleaf的配置信息,引入thymeleaf的jar包,以及创建PageController并添加index方法。 ... [详细]
  • 知识图谱——机器大脑中的知识库
    本文介绍了知识图谱在机器大脑中的应用,以及搜索引擎在知识图谱方面的发展。以谷歌知识图谱为例,说明了知识图谱的智能化特点。通过搜索引擎用户可以获取更加智能化的答案,如搜索关键词"Marie Curie",会得到居里夫人的详细信息以及与之相关的历史人物。知识图谱的出现引起了搜索引擎行业的变革,不仅美国的微软必应,中国的百度、搜狗等搜索引擎公司也纷纷推出了自己的知识图谱。 ... [详细]
  • 本文讲述了作者通过点火测试男友的性格和承受能力,以考验婚姻问题。作者故意不安慰男友并再次点火,观察他的反应。这个行为是善意的玩人,旨在了解男友的性格和避免婚姻问题。 ... [详细]
  • 1,关于死锁的理解死锁,我们可以简单的理解为是两个线程同时使用同一资源,两个线程又得不到相应的资源而造成永无相互等待的情况。 2,模拟死锁背景介绍:我们创建一个朋友 ... [详细]
  • 后台获取视图对应的字符串
    1.帮助类后台获取视图对应的字符串publicclassViewHelper{将View输出为字符串(注:不会执行对应的ac ... [详细]
  • 《数据结构》学习笔记3——串匹配算法性能评估
    本文主要讨论串匹配算法的性能评估,包括模式匹配、字符种类数量、算法复杂度等内容。通过借助C++中的头文件和库,可以实现对串的匹配操作。其中蛮力算法的复杂度为O(m*n),通过随机取出长度为m的子串作为模式P,在文本T中进行匹配,统计平均复杂度。对于成功和失败的匹配分别进行测试,分析其平均复杂度。详情请参考相关学习资源。 ... [详细]
  • 本文介绍了通过ABAP开发往外网发邮件的需求,并提供了配置和代码整理的资料。其中包括了配置SAP邮件服务器的步骤和ABAP写发送邮件代码的过程。通过RZ10配置参数和icm/server_port_1的设定,可以实现向Sap User和外部邮件发送邮件的功能。希望对需要的开发人员有帮助。摘要长度:184字。 ... [详细]
  • 动态规划算法的基本步骤及最长递增子序列问题详解
    本文详细介绍了动态规划算法的基本步骤,包括划分阶段、选择状态、决策和状态转移方程,并以最长递增子序列问题为例进行了详细解析。动态规划算法的有效性依赖于问题本身所具有的最优子结构性质和子问题重叠性质。通过将子问题的解保存在一个表中,在以后尽可能多地利用这些子问题的解,从而提高算法的效率。 ... [详细]
  • Android JSON基础,音视频开发进阶指南目录
    Array里面的对象数据是有序的,json字符串最外层是方括号的,方括号:[]解析jsonArray代码try{json字符串最外层是 ... [详细]
author-avatar
弓X箭_281
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有