当前位置: 首页 > 编程笔记 >

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

阳狐若
2023-03-14
本文向大家介绍代码从windows下visual studio到andriod平台迁移实现步骤,包括了代码从windows下visual studio到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 <cstddef> head file.

4.error: extra qualification 'rw::scoped_lock::' on member 'scoped_lock' [-fpermissive]  
 remove the class identifier.
 
5. memcpy define in <string.h> .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 <string.h>
 
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> 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<pt2model_entity_define>();
	build_pt2model_entity(_pGeometry,_pSymbol,temp_ptr);
17.	fatal error: json\json.h: No such file or director
		#include <json\json.h> ----->#include <json/json.h>
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<char>}' through '.
	--->(content_type_field).c_str();
20.537:49: error: invalid initialization of non-const reference of type 'std::string& {aka std::basic_string<char>&}' from an rvalue of type 'std::string {aka std::basic_string<char>}'
	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 <sstream>
	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<char>::iterator, std::basic_string<char>::iterator, std::basic_string<char>::iterator, <unresolved overloaded function type>)'
    transform(_texture_type.begin(), _texture_type.end(), _texture_type.begin(), ::tolower);
		
28.	GetModuleFileName((HINSTANCE)&__ImageBase,buffer,256);
		#include <stdio.h>
		------->string buffer = getcwd(NULL, 0);
		string execution_path= buffer;
29. xstring ----><string>

30.invalid cast of an rvalue expression of type 'rw::multi_point::ptr {aka rw::rw_shared_ptr<rw::multi_point>}' 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 <malloc.h>
	
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.	

	
	
	
	
		

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

 类似资料:
  • 假设你当前已经在使用 Windows 服务器(使用 SQLite 数据库),现在希望把服务器迁移到 Linux 下。 1. 安装 Linux 服务器 第一步你需要安装全新一个 Linux 服务器。同样使用 SQLite 数据库。下面假设你把 Seafile 服务器默认安装在 /home/haiwen/ 目录下。 2. 替换数据和配置文件 删除 Linux 的配置文件和数据 rm /home/hai

  • 问题内容: 我正在从elasticsearch1.4.3迁移到2.4,并替换了elasticsearch文档中引用的一段代码,而其他参考则需要替换andFilter? 码:- 问题答案: 您可以这样做:

  • 我升级为不和谐。JSV12,但它破坏了我现有的v11代码。下面是一些导致错误的示例: 如何将代码迁移到Discord。JSV12并修复这些错误?在哪里可以看到v12引入的突破性更改?

  • 下面的方法已经使用了一段时间,当时我正在处理的系统有log4j。现在我们正在从Log4j转移到Log4j2,我会遇到编译问题。 Log4j2 jar:log4j-api-2.12.1.jar,log4j-core-2.12.1.jar 有没有人可以提供一些帮助,以解决上述问题的正确方法是什么?

  • 问题内容: 我正在将Java代码库迁移到纯Scala,并且只能使用这一段代码。我有一个IntervalMap的实现,即一个数据结构,可让您有效地将范围映射到,和操作全部所在的位置(与IntervalTree或SegmentTree略有不同)。 这段代码使用Java,并且在迁移到Scala时遇到了两个大问题: Scala没有-我决定使用(奇怪的Scala有但没有)存储密钥并将值存储在辅助中来解决它。

  • 你决定要把你的整个项目从原来的代码管理工具迁移到Git, 要怎么做才比较简单呢? 从Subversion导入 Git包含了一个名为git-svn的脚本, 它有一个克隆(clone)命令, 可以把一个Subversion仓库导入到一个新的Git仓库. GitHub上也有完成同样工作的免费工具. $ git-svn clone http://my-project.googlecode.com/svn/