Menu

Code Generation Tip for plugin authors

Don HO
2007-09-08
2012-11-14
  • Don HO

    Don HO - 2007-09-08

    If your plugin (xxx.dll) doesn't be loaded by Notepad++ for some machines (the error message : "Load Library is failed. This plugin is not compatible bla bla bla bla..."), you may be interested in this tip.

    The project setting for "Runtime Library" should be "Multi-threaded(/MT)". The "Runtime Library" setting is located on "Configuration Properties -> C/C++/ -> Code Generation" in you project Properties Dialog.

    Turn this setting option from "Multi-threaded DLL(/MD)" to "Multi-threaded(/MT)" makes your dll link to the runtime library statically in stead of linking dynamically. As a result, you dll can run on every machine since it contains all the necessary codes and it depends on no dll.

    Don

     
    • Chris Severance

      Chris Severance - 2007-10-01

      http://wiki.codeblocks.org/index.php?title=FAQ
      Microsoft calls MSVCRT.DLL a "Known DLL." How do I know if I can/should use it ?

      The above FAQ entry will explain why the /MD switch isn't safe to use and how you can use it safely if you want to minimize runtime size.