无法向 MFC ActiveX 添加函数
Can't add function to MFC ActiveX
I'正在尝试使用Visual Studio 2010 c++mfc库创建ActiveX组件mfc_ActiveX。向导完成后,系统编译无错误。
用鼠标右键点击Cmfc_activeXCtrl Add>>添加函数并填写参数表,添加了简单的新方法后,我得到了简单的函数:
int Cmfc_activeXCtrl::Hello(int i)
{
return 0;
}
经过这个过程后,我再也无法编译代码了。我有消息:
Error 85 error MSB8011: Failed to register output. Please try enabling Per-user Redirection or register the component from a command prompt with elevated permissions. C:Program Files (x86)MSBuildMicrosoft.Cppv4.0Microsoft.CppCommon.targets 744 6 mfc_activeX
86 IntelliSense: #error directive: Please use the /MD switch for _AFXDLL builds c:program files (x86)microsoft visual studio 10.0vcatlmfcincludeafxver_.h 81 3
如何避免这些错误?
Visual Studio的运行用户没有运行regsvr32的权限,该用户会在成功生成后尝试注册组件。
您可以通过以管理员身份运行Visual Studio来解决此问题。
关于第二个错误
#错误请使用/MD开关进行_AFXDLL构建
事实上,我不得不切换到另一个/Mx设置,然后切换回来,所以选择是粗体的,IDE似乎没有正确更新。
相关文章:
- 哈希表添加函数
- 汇编错误C 在标题文件中添加函数时
- 为什么添加函数在C 11线程中无效
- 在类的快捷菜单上找不到添加函数
- 单链表添加函数-读取访问冲突
- 无法向 MFC ActiveX 添加函数
- 在运行时向对象添加函数集合
- C++ - 如何添加函数以处理货币计算器的多种情况
- 添加函数数组并随机选择其中一个
- 我正在尝试为 c++ 中的数组创建一个添加函数
- Qt从其他线程向事件循环添加函数调用
- 添加参数或添加函数
- 向typedef添加函数
- 在双链表中添加函数会导致无限循环
- 添加函数erf()和erfc()到math.h . _ C基础
- 重载<<运算符和添加函数的问题
- c++初学者.添加函数并调用它失败
- 如果在向类中添加函数时取消选中内联框,则在classname.h中只需要函数原型
- 我终于在链表中制作了我的添加函数,但不能在main中使用.:(.
- 在Qt中在c++中添加C函数时的构建问题