首页 > 其他 > 详细

VC问题锦集

时间:2014-02-20 01:34:03      阅读:593      评论:0      收藏:0      [点我收藏+]

 

1. mfcs100ud.lib(dllmodul.obj) error LNK2005 _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)

参考自:

1、http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/d86b96a2-a5c9-4bfc-98e1-61b55e50ecae/mfcs80udlibdllmodulobj-error-lnk2005-dllmain12-already-defined-in-msvcrtdlibdllmainobj?forum=vclanguage

2、http://support.microsoft.com/kb/148652/zh-cn

 

The KB article is apply to the previous version of VC, in visual studio 2005, there is a little different on how to set the configurations. but the principle under the configuration is the same.

 

To solve it, do the following steps:

1. Open project property pages by Alt+F7

2. Navigate to Configuration properties->Linker->Input section.

3. Add msvcrtd.lib; mfcs80ud.lib to the Ignore specific library. // MSVCRTD.lib;mfcs100ud.lib

4. Add mfcs80ud.lib msvcrtd.lib to the Additional dependencies. // mfcs100ud.lib;MSVCRTD.lib

 

Now we will tell you how to find out these two disorder libraries. In the project property pages, navigate to configuration properties->linker->command line, add /verbose:lib to the additional option. Rebuild your project, and look carefully to the output window, you will find that is mfcs80ud.lib generated the link error, look before mfcs80ud.lib, you will find there is only one CRT library before it, so ignore these 2 libraries in the Ignore specific library, then add them in the additional dependencies with right order. Rebuild again, it should works.

 

2. 当exe依赖的ocx控件未注册,运行exe,会出现如下图错误提示。解决方法:注册ocx控件。

bubuko.com,布布扣

 

3. 创建控件失败,m_pCtrlCont = afxOccManager->CreateContainer(this); 报错,因为m_pOccManagerNULL

解决方法:

bubuko.com,布布扣

BOOL CNewPatientApp::InitInstance()
{
    CWinApp::InitInstance();

    // 添加
    // Call if using OLE Controls  //  异常:m_pCtrlCont = afxOccManager->CreateContainer(this);
    AfxEnableControlContainer();

    return TRUE;
}

bubuko.com,布布扣

 可参考:http://blog.csdn.net/jszj/article/details/3876068

 

4. 若发现vs2010ResourceView标签页为空,可以尝试删除*.sdf  *.ipch,再重新编译工程,再查看ResouceView标签页是否有资源。

 

 

VC问题锦集

原文:http://www.cnblogs.com/ant-wjf/p/3555988.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!