error LNK2005: _DllMain@12 already defined in MSVCRT.lib

前端 未结 17 2071
臣服心动
臣服心动 2020-12-14 06:44

I am getting this linker error.

mfcs80.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRT.lib(dllmain.obj)

17条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-14 07:15

    Make sure you include "Stdafx.h" at the top of each .cpp file. I was getting the exact same error and had a single .cpp file that did not include this header at all. Adding the #include solved the problem.

提交回复
热议问题