Upgrade Issue: Register fails after build ATL project under VC8/VS2005

Issue:

An ATL/COM project can be built and registered successfully under VC7.1/VS2003. After upgrade this project to VC8/VS2005 using the upgrade wizard, it can be built successfully but can not register. Regsvr32 returns nothing for debug version and no sense message for release version.

Root Cause:

After tried many approaches for 3 days, I found the root cause is the item named "_AFX_NO_OCC_SUPPORT" in the preprocessor definitions. This item is ok with VC7.1, but it will make the COM fails to register after built with VC8.

Solution:

Just remove this item from preprocessor definitions. It may causes the compile error of "C2371: 'WCHAR' : redefinition; different basic types c:/program files/microsoft visual studio 8/vc/platformsdk/include/odbcss.h 430 ", if you are using the mentioned odbcss.h file in your project. I have solved this problem by copy this file to my local project folder, and comment out the line of "typedef char DBCHAR;". If I find any better solution, I'll update this article.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值