error LNK4006: _DllCanUnloadNow@ - /FORCE:MULTIPLE doesn't resolve issue


  • I'm getting this linker error: LNK4006: _DllCanUnloadNow@0 already defined in dlldata.obj; second definition ignored

    Linking with flag /FORCE:MULTIPLE doesn't help.  Does anyone know how to fix this?


    Saturday, February 10, 2007 12:39 AM


  • hello

    In this article in MSDN it mentioned that "If a module is compiled with /clr, /FORCE will not create an image.", I believe this is the reason that /FORCE:MULTIPLE doesn't help. 

    Are you using /WX switch to the linker settings? If so, remove this switch so that LNK4006 can be considered as a warning so that you can generate output file. This solution is an equivalent to the attempt of using /FORCE:MULTIPLE switch, but not solve LNK4006 directly. If you do want to get rid of LNK4006, then we need more information like the project background, the VC version you are using, and the scenarios around this error.



    Monday, February 12, 2007 4:50 AM