zoukankan      html  css  js  c++  java
  • win32 Dll 中添加afx.h 出现如下错误 error LNK2005: _DllMain@12 already defined

    win32 Dll 中添加afx.h 出现如下错误

    nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in ssmFunc.obj
    nafxcwd.lib(dllmodul.obj) : warning LNK4006: _DllMain@12 already defined in ssmFunc.obj; second definition ignored
       Creating library Debug/ssmFunc.lib and object Debug/ssmFunc.exp
    Debug/ssmFunc.dll : fatal error LNK1169: one or more multiply defined symbols found
    Error executing link.exe.

    ssmFunc.dll - 2 error(s), 1 warning(s)
    解决方法:头文件中添加

    #ifdef _X86_
    extern "C" { int _afxForceUSRDLL; }
    #else
    extern "C" { int __afxForceUSRDLL; }
    #endif 

  • 相关阅读:
    C语言基础10
    swift笔记06
    C语言基础09
    C语言基础08
    C语言基础07
    C语言基础06
    swift笔记05
    Swift笔记4
    C语言基础05
    [转]一个清华计算机博士生的退学申请
  • 原文地址:https://www.cnblogs.com/klxll/p/3237824.html
Copyright © 2011-2022 走看看