谢谢楼上的指点,我运行时库已设成/MT编译。
我生成的可执行程序是可以在XP上运行,但MFC Activex项目生成的.ocx在XP下无法注册。
用dependency查看:“错误:由于在隐性依赖模块中丢失导出函数”,但看不出是哪个丢失。

解决方案 »

  1.   

    你先生一个简单的OCX,就是代码里只用普通C的函数,比如加法运算,然后看看能不能在XP下注册,如果可以注册,就看你的OCX里都用了什么类什么库,有可能是某个类或某个库不能在XP下运行
      

  2.   

    查到原因了,这是微软VS2012 update2的一个bug。
    KERNEL32.dll里的InitializeCriticalSectionEx方法有问题。
    解决方法:
    To use this solution, simply add build customizations (masm) to your project by right clicking on the project in solution explorer and choosing “build customizations” and check masm (targets, props) on, then add the three files (xpatl.cpp, xpatlwrap.asm, and xpatlwrap64.asm) contained in the zip file named: xpsupportvc11upd2v102.zip found here:
    https://skydrive.live.com/redir?resid=1B361BF333E9AB82!153&authkey=!AEAOQJ4-LCqWQiw具体参考:
    http://blog.sina.com.cn/s/blog_671c54fe0101cn41.html
      

  3.   

    你提供的网址登陆不了,能给我传送下那3个文件吗(xpatl.cpp, xpatlwrap.asm, and xpatlwrap64.asm)  谢谢了!