MTK MODIS 出现的一个问题

mmidsm.c
C:/Program Files/Microsoft Visual Studio/VC98/INCLUDE/windef.h(142) : error C2371: 'BOOL' : redefinition; different basic types
        ../../plutommi/mmi/Inc/MMIDataType.h(435) : see declaration of 'BOOL'
C:/Program Files/Microsoft Visual Studio/VC98/INCLUDE/windef.h(159) : warning C4091: 'typedef ' : ignored on left of 'const int ' when no variable is declared
C:/Program Files/Microsoft Visual Studio/VC98/INCLUDE/winnt.h(152) : warning C4091: 'typedef ' : ignored on left of 'const int ' when no variable is declared
C:/Program Files/Microsoft Visual Studio/VC98/INCLUDE/winnt.h(156) : warning C4091: 'typedef ' : ignored on left of 'const int ' when no variable is declared
C:/Program Files/Microsoft Visual Studio/VC98/INCLUDE/winnt.h(164) : warning C4091: 'typedef ' : ignored on left of 'const int ' when no variable is declared
C:/Program Files/Microsoft Visual Studio/VC98/INCLUDE/winnt.h(167) : warning C4091: 'typedef ' : ignored on left of 'const int ' when no variable is declared
C:/Program Files/Microsoft Visual Studio/VC98/INCLUDE/winnt.h(196) : error C2061: syntax error : identifier 'LPCTSTR'
---------------------------------------------------------------------

你找找包含windows.h的地方,加上宏_WINDOWS_
#if !defined(__MTK_TARGET__)
#include <windows.h>
#define _WINDOWS_
#endif
----------------------------------------------------------------------

1.在 MMIDataType.h (plutommi/mmi/inc)中
...

#if !defined(WIN32) || !defined(_WINDOWS_)
    typedef unsigned char   BOOL;
#ifndef CONST
    #define CONST const;
#endif
#endif

....

 

2.与C:/Program Files/Microsoft Visual Studio/VC98/INCLUDE/windef.h中定义的BOOL冲突

 

3.在tool/mingw/include/windef.h也定义BOOL,而windef.h包含于tool/mingw/include/windows.h,故

#include <windows.h> 或者#include “windows.h”也就定义了BOOL

 

4.#if !defined(__MTK_TARGET__) 或者#ifndef __MTK_TARGET__ 是针对new时BOOL不起作用,而针对modis起作用

 

5.使用了

#if !defined(__MTK_TARGET__)
#include <windows.h>
#define _WINDOWS_
#endif


A:用了#include <windows.h>就不会用C:/Program Files/Microsoft Visual Studio/VC98/INCLUDE/windef.h中定义的BOOL了,会用windows.h中包含的windef.h定义的BOOL

B:定义了#define _WINDOWS_就不会使用plutommi/mmi/inc/MMIDataType.h中定义的BOOL了

C:if !defined(__MTK_TARGET__)或者#ifndef __MTK_TARGET__是针对new时BOOL不起作用,而针对modis起作用

========================================================================================

MTK生成lib库(Win32)

1.      首先要确定你的电脑上安装了visual c++ 6.0(其他版本没试过),假设我们将vc安装在了C:/Program Files/Microsoft Visual Studio

2.      在桌面上右键点击“我的电脑”---属性---高级---环境变量

3.      在系统变量里找到“path”,双击编辑

4.      在变量值的最后添加“;C:/Program Files/Microsoft Visual Studio/VC98/Bin;C:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin”

5.      点击确定

6.      新建一个环境变量,变量名:“INCLUDE”,变量值:“C:/Program Files/Microsoft Visual Studio/VC98/INCLUDE”

7.      再新建一个环境变量,变量名:“LIB”,变量值:“C:/Program Files/Microsoft Visual Studio/VC98/LIB”

8.      确定保存

然后就可以使用VC的link命令来打win32 的lib包了

举个例子

将使用vc编译出来的obj文件(注意不是arm编译出来的obj),例如:../MoDIS/mmi_app/Debug中你需要的obj拷贝到D:/obj下用命令行模式进入该目录,执行 link /lib /out:mylib.lib *.obj就可以生成一个mylib.lib的目标文件

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值