请选择 进入手机版 | 继续访问电脑版
返回官网官方微博

麦步社区-论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
热搜: MAI 表盘
查看: 3592|回复: 8

求助,第一次编程编译都过不去

[复制链接]

5

主题

235

帖子

1787

麦力

精华
0
阅读权限
50
在线时间
42 小时

麦步手表用户

发表于 2016-8-26 09:49:41 | 显示全部楼层 |阅读模式
把缤纷多显程序三个文件原封不动的考进去,编译都通不过,错误如下:
D:\VisualMWatch_W64_v14\VisualMWatch_W64\watcheface_show_more.c: In function 'init_window':
D:\VisualMWatch_W64_v14\VisualMWatch_W64\watcheface_show_more.c:309:72: warning: passing argument 5 of 'display_target_layerText' from incompatible pointer type
  display_target_layerText(p_window,&temp_frame,GAlignRight,GColorWhite,&g_show_more_str_battery_percent,U_ASCII_ARIAL_12);
                                                                        ^
D:\VisualMWatch_W64_v14\VisualMWatch_W64\watcheface_show_more.c:263:9: note: expected 'char *' but argument is of type 'char (*)[4]'
int32_t display_target_layerText(P_Window p_window,GRect  *temp_p_frame,enum GAlign how_to_align,enum GColor color,char * str,uint8_t font_type)
         ^
D:\VisualMWatch_W64_v14\VisualMWatch_W64\watcheface_show_more.c: In function 'data_handler_per_minute':
D:\VisualMWatch_W64_v14\VisualMWatch_W64\watcheface_show_more.c:419:34: warning: passing argument 2 of 'strcat' from incompatible pointer type
  strcat(g_show_more_str_altitude,&MMM);
                                  ^
In file included from D:\VisualMWatch_W64_v14\VisualMWatch_W64\watcheface_show_more.c:3:0:
D:/VisualMWatch_W64_v14/VisualMWatch_W64/mbcc/x86_64-w64-mingw32/include/string.h:52:18: note: expected 'const char * __restrict__' but argument is of type 'char (*)[2]'
   char * __cdecl strcat(char * __restrict__ _Dest,const char * __restrict__ _Source);
                  ^
D:\VisualMWatch_W64_v14\VisualMWatch_W64\watcheface_show_more.c: In function 'main':
D:\VisualMWatch_W64_v14\VisualMWatch_W64\watcheface_show_more.c:675:37: warning: passing argument 1 of 'maibu_comm_register_phone_callback' from incompatible pointer type
  maibu_comm_register_phone_callback(get_city_info_callback);
                                     ^
In file included from .\mbcc\include/maibu_sdk.h:23:0,
                 from D:\VisualMWatch_W64_v14\VisualMWatch_W64\watcheface_show_more.c:5:
.\mbcc\include/os_comm.h:306:6: note: expected 'CBCommPhone' but argument is of type 'void (*)(enum ERequestPhone,  void *)'
void maibu_comm_register_phone_callback(CBCommPhone phone_callback);
      ^


5

主题

235

帖子

1787

麦力

精华
0
阅读权限
50
在线时间
42 小时

麦步手表用户

 楼主| 发表于 2016-8-26 09:54:04 | 显示全部楼层
需要在源代码main函数中开头处添加simulator_init()接口,以及在return前添加simulator_wait()接口,难道是这个原因?

5

主题

235

帖子

1787

麦力

精华
0
阅读权限
50
在线时间
42 小时

麦步手表用户

 楼主| 发表于 2016-8-26 09:57:24 | 显示全部楼层
果真如此
回复

使用道具 举报

11

主题

150

帖子

1059

麦力

精华
0
阅读权限
50
在线时间
42 小时

发表于 2016-8-26 10:36:50 | 显示全部楼层
dustin134 发表于 2016-8-26 09:54
需要在源代码main函数中开头处添加simulator_init()接口,以及在return前添加simulator_wait()接口,难道是 ...

和simulator_xxx 没关系的

11

主题

150

帖子

1059

麦力

精华
0
阅读权限
50
在线时间
42 小时

发表于 2016-8-26 10:37:55 | 显示全部楼层
编译应该可以通过吧,这些是一些警告,可以忽略

5

主题

235

帖子

1787

麦力

精华
0
阅读权限
50
在线时间
42 小时

麦步手表用户

 楼主| 发表于 2016-8-26 10:53:55 | 显示全部楼层
dualxu 发表于 2016-8-26 10:36
和simulator_xxx 没关系的

加上了那两个函数就通过了,不过看了一下源程序,貌似很难看懂,还有好像GPS的调用是没5分钟调用一次,这么频繁啊,不是说15分钟吗

5

主题

235

帖子

1787

麦力

精华
0
阅读权限
50
在线时间
42 小时

麦步手表用户

 楼主| 发表于 2016-8-26 10:55:22 | 显示全部楼层
dualxu 发表于 2016-8-26 10:37
编译应该可以通过吧,这些是一些警告,可以忽略

//判断是否距离上次成功获得数据超过5分钟
        if(get_time_out_flag(5)||(g_weather_bmp_key == -1))
        {
                //请求GPS数据并注册GPS数据请求超时回调
                request_get_city_info();
               
        }

26

主题

792

帖子

1万

麦力

精华
1
阅读权限
100
在线时间
691 小时

麦步手表用户麦步工业测评协会

发表于 2016-8-26 21:51:49 | 显示全部楼层
楼主模拟时天气,温度,能显示吗

5

主题

235

帖子

1787

麦力

精华
0
阅读权限
50
在线时间
42 小时

麦步手表用户

 楼主| 发表于 2016-8-26 22:06:29 | 显示全部楼层
tda8361 发表于 2016-8-26 21:51
楼主模拟时天气,温度,能显示吗

没有显示,毕竟只是模拟,没有与手机相连啊
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|麦步官方论坛 ( 粤ICP备12052190号  

GMT+8, 2024-3-29 21:52 , Processed in 0.082623 second(s), 25 queries .

Powered by Discuz! X3.2

© 2012-2021 Comsenz Inc.

快速回复 返回顶部 返回列表