针对MTK MODIS 出错的几个解决办法(原创)

简介: 针对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起作用

对于modis编译出现找不到.h文件的现象,我们需要找MoDIS_VC9对应模块下面的ini文件,把需要的目录加入进去

如:/I "..\..\hal\system\counter\inc"

对于6260M平台在modisconfig.mak里必须要修改一下的vc相关目录,其它平台修改另外的mak文件。

# *************************************************************************
# Folder Structure Config
# *************************************************************************
VSCommonDir := D:\Program Files\Microsoft Visual Studio 9.0\Common7
MSVCDir := D:\Program Files\Microsoft Visual Studio 9.0\VC
VcOsDir := WINNT
FrameworkDir := D:\WINDOWS\Microsoft.NET\Framework
WindowsSDKDir := D:\Program Files\\Microsoft SDKs\Windows\v6.0A
MODIS_SUFFIX :=
MODIS_UESIM := MoDIS
MODISDIR := MoDIS_VC9
相关文章
|
5天前
|
Perl
mtk 添加新模块模拟器modis编译
mtk 添加新模块模拟器modis编译
12 1
|
5天前
|
网络协议 Shell Linux
安卓逆向 -- IDA动态调试
安卓逆向 -- IDA动态调试
37 0
|
6月前
|
存储 编译器 API
[√]vld源码共读
[√]vld源码共读
21 0
|
Windows
nxp官方uboot移植到野火开发板PRO(无任何代码逻辑的修改)
nxp官方uboot移植到野火开发板PRO(无任何代码逻辑的修改)
112 0
|
C++ Windows
全网首发:编译ffmpeg: error: ‘VFW_E_NOT_FOUND‘ undeclared ; did you mean ‘NTE_NOT_FOUND‘?
全网首发:编译ffmpeg: error: ‘VFW_E_NOT_FOUND‘ undeclared ; did you mean ‘NTE_NOT_FOUND‘?
119 0
|
Android开发
全网首发:编译Android doubango时,armv7-a编译不出来的解决办法
全网首发:编译Android doubango时,armv7-a编译不出来的解决办法
142 0
|
安全
[经验]使用Keil MDK+Jlink-OB下载失败的解决办法
[经验]使用Keil MDK+Jlink-OB下载失败的解决办法
461 0
[经验]使用Keil MDK+Jlink-OB下载失败的解决办法
关于 国产麒麟系统编译Qt项目是报错:error: cannot find -lGL 的解决方法
关于 国产麒麟系统编译Qt项目是报错:error: cannot find -lGL 的解决方法
关于 国产麒麟系统编译Qt项目是报错:error: cannot find -lGL 的解决方法
|
数据可视化 C++
VTK报错汇总,附上解决方案
1, no override found for ‘vtkPolyDataMapper’ 解决办法 错误原因 VTK在图像可视化过程中基本流程:Data -> Mapper -> Actor -> Renderer -> Renderwindow -> VTKRenderWindow;
全网首发:doubango提示text relocations错误的解决办法
全网首发:doubango提示text relocations错误的解决办法
172 0