读书人

pc-lint 有关问题

发布时间: 2012-03-09 21:42:55 作者: rapoo

pc-lint 问题
我装了PC-LINT 9.0,在source insight中对一个文件做检查的时候报了错:

PC-lint for C/C++ (NT) Vers. 9.00h, Copyright Gimpel Software 1985-2011

--- Module: D:\agentX++\examples\subagent\include\pnems_subagentConfig.h (C)


_
#error ERROR: Only Mac or Win32 targets supported!
C:\Program Files\Microsoft Visual Studio\VC98\Include\errno.h 24 Error 309:
#error ERROR: Only Mac or Win32 targets supported!

这个是什么问题,求大侠帮忙解决

[解决办法]
没定义WIN32宏?你编译也过不了吧么
[解决办法]
 #if !defined(_WIN32) && !defined(_MAC)
  #error ERROR: Only Mac or Win32 targets supported!
  #endif
显然的问题,没定义_WIN32宏
[解决办法]
定义_WIN32宏

嫌麻烦
直接在#if !defined(_WIN32) && !defined(_MAC)
之前
加入
#define _WIN32

读书人网 >C++

热点推荐