코드가 윈도우즈에서 비주얼 스튜디오에서andriod 플랫폼으로 이동하는 절차
전언
앞에서 말한 바와 같이 윈도우즈의 비주얼 스튜디오 2012 플랫폼에서 안드로이드 플랫폼으로 이동하려면 수정된 코드와 주의해야 할 부분을 많이 사용해야 한다.
우리의 당연한 플랫폼은 당초에 다른 플랫폼의 크로스플랫폼의 응용 문제를 고려했기 때문에 처음에 윈도우즈에서 cmake로 프로젝트를 완성했다. cMakeLists.txt 파일은 모두 약간의 처리를 했지만, 이때는 윈도우즈의 컴파일링과 사용을 우선적으로 보장할 뿐입니다.
삼가 기록을 하겠습니다.
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<: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();
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<: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
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.
읽어주셔서 감사합니다. 여러분께 도움이 되었으면 좋겠습니다. 본 사이트에 대한 지지에 감사드립니다!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.