Pegram
论坛版主
论坛版主
  • 注册日期2005-12-03
  • 最后登录2013-08-23
  • 粉丝13
  • 关注5
  • 积分1333分
  • 威望4717点
  • 贡献值1点
  • 好评度78点
  • 原创分0分
  • 专家分2分
阅读:1358回复:3

如何在驱动中使用static_cast和reinterpret_cast这样的操作符?

楼主#
更多 发布于:2009-01-09 18:25
很怪,我尝试着添加了很多头文件,都不行。比如:
#include <windef.h>
#include <stdio.h>
#include <stdlib.h>

我是因为看到有驱动文件里面可以用转换操作的,才到此一问。希望知者相告。
《寒江独钓》与《竹林蹊径》的合作作者。精通USB开发,设计了CY001 USB驱动套件(http://bbs.driverdevelop.com/read.php?tid-119314.html)。
Pegram
论坛版主
论坛版主
  • 注册日期2005-12-03
  • 最后登录2013-08-23
  • 粉丝13
  • 关注5
  • 积分1333分
  • 威望4717点
  • 贡献值1点
  • 好评度78点
  • 原创分0分
  • 专家分2分
沙发#
发布于:2009-01-10 09:31
没有人知道啊?
《寒江独钓》与《竹林蹊径》的合作作者。精通USB开发,设计了CY001 USB驱动套件(http://bbs.driverdevelop.com/read.php?tid-119314.html)。
Pegram
论坛版主
论坛版主
  • 注册日期2005-12-03
  • 最后登录2013-08-23
  • 粉丝13
  • 关注5
  • 积分1333分
  • 威望4717点
  • 贡献值1点
  • 好评度78点
  • 原创分0分
  • 专家分2分
板凳#
发布于:2009-01-14 16:50
upupup
《寒江独钓》与《竹林蹊径》的合作作者。精通USB开发,设计了CY001 USB驱动套件(http://bbs.driverdevelop.com/read.php?tid-119314.html)。
Pegram
论坛版主
论坛版主
  • 注册日期2005-12-03
  • 最后登录2013-08-23
  • 粉丝13
  • 关注5
  • 积分1333分
  • 威望4717点
  • 贡献值1点
  • 好评度78点
  • 原创分0分
  • 专家分2分
地板#
发布于:2009-01-20 15:35
No one answered. I think it's not because it's too easy to not being need to answer. But just opposite.
Now the problem has been fixed. It's because that the cast operators shoulb be used under C++ complier. To use C++ complier, you need to either change the extension of each '.c' file to .cpp or add 'USECXX_FLAG=-TP' in your source file.
Many thanks to Martin O'Brien.
《寒江独钓》与《竹林蹊径》的合作作者。精通USB开发,设计了CY001 USB驱动套件(http://bbs.driverdevelop.com/read.php?tid-119314.html)。
游客

返回顶部